<Window x:Class="MaterialDesignColors.WpfExample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        
        xmlns:wpfExample="clr-namespace:MaterialDesignColors.WpfExample"
        xmlns:domain="clr-namespace:MaterialDesignColors.WpfExample.Domain"
        xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
        Title="Material Design in XAML" Height="800" Width="1100"
        TextElement.Foreground="{DynamicResource MaterialDesignBody}"
        TextElement.FontWeight="Medium"
        TextElement.FontSize="14"
        TextOptions.TextFormattingMode="Ideal" 
        TextOptions.TextRenderingMode="Auto"        
        Background="{DynamicResource MaterialDesignPaper}"
        FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto" Icon="favicon.ico">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Shadows.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ToggleButton.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
        </ResourceDictionary>
    </Window.Resources>

    <DockPanel>
        <wpf:ColorZone Padding="16" Effect="{StaticResource MaterialDesignShadowDepth2}"
                       Mode="PrimaryMid" DockPanel.Dock="Top">
            <DockPanel>
                <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="True"
                              x:Name="MenuToggleButton"/>
                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22">Material Design In XAML WPF</TextBlock>
            </DockPanel>
        </wpf:ColorZone>
        <ListBox DockPanel.Dock="Left" x:Name="DemoItemsListBox" Margin="16 16 0 16" SelectedIndex="0"
                 Visibility="{Binding ElementName=MenuToggleButton, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
            <ListBox.ItemTemplate>
                <DataTemplate DataType="domain:DemoItem">
                    <TextBlock Text="{Binding Name}" />
                </DataTemplate>
            </ListBox.ItemTemplate>
            <domain:DemoItem Name="Home">
                <domain:DemoItem.Content>
                    <wpfExample:Home />
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Palette">
                <domain:DemoItem.Content>
                    <wpfExample:PaletteSelector>
                        <wpfExample:PaletteSelector.DataContext>
                            <wpfExample:PaletteSelectorViewModel />
                        </wpfExample:PaletteSelector.DataContext>
                    </wpfExample:PaletteSelector>
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Buttons &amp; Toggles">
                <domain:DemoItem.Content>
                    <wpfExample:Buttons />
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Fields">
                <domain:DemoItem.Content>
                    <wpfExample:TextFields />
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Cards">
                <domain:DemoItem.Content>
                    <wpfExample:Cards />
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Colour Zones">
                <domain:DemoItem.Content>
                    <wpfExample:ColorZones />
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Lists">
                <domain:DemoItem.Content>
                    <wpfExample:Lists>
                        <wpfExample:Lists.DataContext>
                            <domain:ListsAndGridsViewModel />
                        </wpfExample:Lists.DataContext>
                    </wpfExample:Lists>
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Trees">
                <domain:DemoItem.Content>
                    <wpfExample:Trees />
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Grids">
                <domain:DemoItem.Content>
                    <wpfExample:Grids>
                        <wpfExample:Grids.DataContext>
                            <domain:ListsAndGridsViewModel />
                        </wpfExample:Grids.DataContext>
                    </wpfExample:Grids>
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Menus &amp; Tool Bars">
                <domain:DemoItem.Content>
                    <wpfExample:MenusAndToolBars />
                </domain:DemoItem.Content>
            </domain:DemoItem>
            <domain:DemoItem Name="Progress Indicators">
                <domain:DemoItem.Content>
                    <wpfExample:Progress />
                </domain:DemoItem.Content>
            </domain:DemoItem>
        </ListBox>
        <ContentControl Margin="16" Content="{Binding ElementName=DemoItemsListBox, Path=SelectedItem.Content}" />
    </DockPanel>

</Window>
