mirror of
https://github.com/holgerb83/ModernWpfPlayground.git
synced 2025-04-19 23:03:49 +02:00
97 lines
4.1 KiB
XML
97 lines
4.1 KiB
XML
<Window
|
|
x:Class="ModernWpfPlayground.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:ModernWpfPlayground"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:ui="http://schemas.modernwpf.com/2019"
|
|
x:Name="Window"
|
|
Title="TaBEA 3.0.0"
|
|
Width="800"
|
|
Height="450"
|
|
ui:TitleBar.ExtendViewIntoTitleBar="True"
|
|
ui:WindowHelper.UseModernWindowStyle="True"
|
|
mc:Ignorable="d">
|
|
<Window.Resources>
|
|
<local:PixelsToGridLengthConverter x:Key="PixelsToGridLength" />
|
|
</Window.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid x:Name="AppTitleBar" Height="{Binding ElementName=Window, Path=(ui:TitleBar.Height)}">
|
|
<Grid.Style>
|
|
<Style TargetType="Grid">
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsActive, ElementName=Window}" Value="False">
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SystemControlDisabledBaseMediumLowBrush}" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Grid.Style>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="{Binding ElementName=Window, Path=(ui:TitleBar.SystemOverlayLeftInset), Converter={StaticResource PixelsToGridLength}}" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Menu
|
|
Grid.Column="1"
|
|
Height="{Binding ElementName=Window, Path=(ui:TitleBar.Height)}"
|
|
Margin="0"
|
|
Padding="0"
|
|
WindowChrome.IsHitTestVisibleInChrome="True">
|
|
<Menu.Resources>
|
|
<Style BasedOn="{StaticResource {x:Type MenuItem}}" TargetType="MenuItem">
|
|
<Style.Triggers>
|
|
<Trigger Property="Role" Value="TopLevelHeader">
|
|
<Setter Property="Height" Value="{Binding ElementName=Window, Path=(ui:TitleBar.Height)}" />
|
|
</Trigger>
|
|
<DataTrigger Binding="{Binding IsActive, ElementName=Window}" Value="False">
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SystemControlDisabledBaseMediumLowBrush}" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Menu.Resources>
|
|
<MenuItem Header="File">
|
|
<MenuItem Header="New" />
|
|
<MenuItem Header="Open" />
|
|
<Separator />
|
|
<MenuItem Header="Close" />
|
|
</MenuItem>
|
|
<MenuItem Header="Edit">
|
|
<MenuItem Header="Copy" />
|
|
<MenuItem Header="Cut" />
|
|
<MenuItem Header="Paste" />
|
|
</MenuItem>
|
|
<MenuItem Header="Help">
|
|
<MenuItem Header="?" />
|
|
<Separator />
|
|
<MenuItem Header="Info" />
|
|
</MenuItem>
|
|
</Menu>
|
|
<!--<ui:TitleBarButton
|
|
x:Name="ForwardButton"
|
|
Grid.Column="1"
|
|
Content=""
|
|
Style="{StaticResource AppTitleBarBackButtonStyle}" />-->
|
|
|
|
<!-- Horizontally centered title -->
|
|
<TextBlock
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontSize="13"
|
|
Text="{Binding ElementName=Window, Path=Title}" />
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</Window>
|
|
|