<Window x:Class="Demo_TODO.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:prism="http://prismlibrary.com/"
        Title="MainWindow"
        Width="1280"
        Height="768"
        prism:ViewModelLocator.AutoWireViewModel="True"
        AllowsTransparency="True"
        Background="{DynamicResource MaterialDesignPaper}"
        FontFamily="微软雅黑"
        TextElement.FontSize="13"
        TextElement.FontWeight="Regular"
        TextElement.Foreground="{DynamicResource MaterialDesignBody}"
        TextOptions.TextFormattingMode="Ideal"
        TextOptions.TextRenderingMode="Auto"
        WindowStartupLocation="CenterScreen"
        WindowStyle="None"
        mc:Ignorable="d">
    <materialDesign:DialogHost DialogTheme="Inherit" Identifier="RootDialog"
                               SnackbarMessageQueue="{Binding ElementName=MainSnackbar, Path=MessageQueue}">

        <materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
            <materialDesign:DrawerHost.LeftDrawerContent>
                <DockPanel MinWidth="220">
                    <ToggleButton Margin="16"
                                  HorizontalAlignment="Right"
                                  DockPanel.Dock="Top"
                                  IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}"
                                  Style="{StaticResource MaterialDesignHamburgerToggleButton}" />

                    <TextBox x:Name="DemoItemsSearchBox"
                             Width="200"
                             Margin="16,4"
                             materialDesign:HintAssist.Hint="Search"
                             materialDesign:TextFieldAssist.DecorationVisibility="Collapsed"
                             materialDesign:TextFieldAssist.HasClearButton="True"
                             DockPanel.Dock="Top"
                             Style="{StaticResource MaterialDesignOutlinedTextBox}"
                             Text="{Binding SearchKeyword, UpdateSourceTrigger=PropertyChanged}" />
                </DockPanel>
            </materialDesign:DrawerHost.LeftDrawerContent>

            <DockPanel>
                <materialDesign:ColorZone Padding="16" Name="ColorZone"
                                          DockPanel.Dock="Top"
                                          Mode="PrimaryMid">
                    <DockPanel>
                        <StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
                            <Image Source="Images/Avatar.jpg" Width="25" Height="25">
                                <Image.Clip>
                                    <EllipseGeometry Center="12.5,12.5" RadiusX="12.5" RadiusY="12.5" />
                                </Image.Clip>
                            </Image>
                            <Button Name="MinButton" Style="{StaticResource MaterialDesignFlatMidBgButton}">➖️</Button>
                            <Button Name="MaxButton" Style="{StaticResource MaterialDesignFlatMidBgButton}">⬜</Button>
                            <Button Name="CloseButton" Style="{StaticResource MaterialDesignFlatMidBgButton}">✖️️</Button>
                        </StackPanel>

                        <StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
                            <ToggleButton x:Name="MenuToggleButton"
                                          AutomationProperties.Name="HamburgerToggleButton"
                                          IsChecked="False"
                                          Style="{StaticResource MaterialDesignHamburgerToggleButton}" />

                            <Button Margin="24,0,0,0"
                                    materialDesign:RippleAssist.Feedback="{Binding RelativeSource={RelativeSource Self}, Path=Foreground}"
                                    Command="{Binding MovePrevCommand}"
                                    Content="{materialDesign:PackIcon Kind=ArrowLeft,
                                                        Size=24}"
                                    Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"
                                    Style="{StaticResource MaterialDesignToolButton}"
                                    ToolTip="Previous Item" />

                            <Button Margin="16,0,0,0"
                                    materialDesign:RippleAssist.Feedback="{Binding RelativeSource={RelativeSource Self}, Path=Foreground}"
                                    Command="{Binding MoveNextCommand}"
                                    Content="{materialDesign:PackIcon Kind=ArrowRight,
                                                        Size=24}"
                                    Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"
                                    Style="{StaticResource MaterialDesignToolButton}"
                                    ToolTip="Next Item" />

                            <TextBlock Margin="30,0,0,0"
                                       HorizontalAlignment="Center"
                                       VerticalAlignment="Center"
                                       AutomationProperties.Name="笔记本"
                                       FontSize="22"
                                       Text="笔记本" />
                        </StackPanel>
                    </DockPanel>
                </materialDesign:ColorZone>

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>

                    <ScrollViewer x:Name="MainScrollViewer"
                                  Grid.Row="1"
                                  materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
                                  HorizontalScrollBarVisibility="{Binding SelectedItem.HorizontalScrollBarVisibilityRequirement, FallbackValue=Disabled}"
                                  VerticalScrollBarVisibility="{Binding SelectedItem.VerticalScrollBarVisibilityRequirement, FallbackValue=Disabled}">
                        <ContentControl Margin="{Binding MarginRequirement, FallbackValue=16}"
                                        Content="{Binding Content, UpdateSourceTrigger=PropertyChanged, FallbackValue={x:Null}}"
                                        DataContext="{Binding SelectedItem}" />
                    </ScrollViewer>

                    <materialDesign:Snackbar x:Name="MainSnackbar"
                                             Grid.Row="1"
                                             MessageQueue="{materialDesign:MessageQueue}" />
                </Grid>
            </DockPanel>
        </materialDesign:DrawerHost>
    </materialDesign:DialogHost>
</Window>