2016-07-24 22:09:14 +02:00

104 lines
5.5 KiB
XML

<Window x:Class="MaterialModernWPF.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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:modern="http://modernwpf"
x:Name="theWindow"
Title="Chrome With 3rd Party Material Theme"
Width="920"
Height="600"
modern:UIHooks.AutoDpiScale="True"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
ResizeMode="CanResizeWithGrip"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Indigo.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<modern:Chrome.Chrome>
<modern:Chrome ActiveBorderBrush="{StaticResource PrimaryHueDarkBrush}" />
</modern:Chrome.Chrome>
<materialDesign:DialogHost Identifier="RootDialog">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<modern:TitleBar x:Name="titleBar"
Grid.Row="0"
Background="{StaticResource PrimaryHueDarkBrush}"
ShowIcon="False" />
<materialDesign:DrawerHost Grid.Row="1" IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
<materialDesign:DrawerHost.LeftDrawerContent>
<DockPanel MinWidth="212">
<ToggleButton Margin="16"
HorizontalAlignment="Right"
DockPanel.Dock="Top"
IsChecked="{Binding ElementName=MenuToggleButton,
Path=IsChecked,
Mode=TwoWay}"
Style="{StaticResource MaterialDesignHamburgerToggleButton}" />
<Grid>
<Button>Hello World</Button>
</Grid>
</DockPanel>
</materialDesign:DrawerHost.LeftDrawerContent>
<DockPanel>
<materialDesign:ColorZone materialDesign:ShadowAssist.ShadowDepth="Depth2"
DockPanel.Dock="Top"
Mode="PrimaryMid"
Padding="16">
<DockPanel>
<ToggleButton x:Name="MenuToggleButton"
IsChecked="False"
Style="{StaticResource MaterialDesignHamburgerToggleButton}" />
<materialDesign:PopupBox DockPanel.Dock="Right"
PlacementMode="BottomAndAlignRightEdges"
StaysOpen="False">
<StackPanel>
<Button Content="Hello World" />
<Button Content="Nice Popup" />
<Button Content="Goodbye" />
</StackPanel>
</materialDesign:PopupBox>
<TextBlock HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="22">
Material Design In XAML Toolkit
</TextBlock>
</DockPanel>
</materialDesign:ColorZone>
<StackPanel Grid.Row="1" Margin="8">
<TextBlock Text="This window demonstrates using core Chrome + external theming lib (ButchersBoy)." TextWrapping="Wrap" />
<Button Content="Hello Button" />
<ComboBox>
<ComboBoxItem Content="A" />
<ComboBoxItem Content="B" />
<ComboBoxItem Content="C" />
<ComboBoxItem Content="D" />
<ComboBoxItem Content="E" />
</ComboBox>
</StackPanel>
</DockPanel>
</materialDesign:DrawerHost>
</Grid>
</materialDesign:DialogHost>
</Window>