<Window xmlns="https://github.com/avaloniaui" MinWidth="500" MinHeight="300"
        Width="1024" Height="800"
        xmlns:pages="clr-namespace:ControlCatalog.Pages"
        Title="Avalonia Control Gallery"
        Icon="/Assets/test_icon.ico"
        xmlns:local="clr-namespace:ControlCatalog"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:ControlCatalog.ViewModels"
        xmlns:v="clr-namespace:ControlCatalog.Views"
        ExtendClientAreaToDecorationsHint="{Binding ExtendClientAreaEnabled}"
        ExtendClientAreaChromeHints="{Binding ChromeHints}"
        ExtendClientAreaTitleBarHeightHint="{Binding TitleBarHeight}"
        TransparencyLevelHint="{Binding TransparencyLevel}"        
        x:Name="MainWindow"
        Background="Transparent"
        x:Class="ControlCatalog.MainWindow" WindowState="{Binding WindowState, Mode=TwoWay}">
  <NativeMenu.Menu>
    <NativeMenu>
      <NativeMenuItem Header="File">
        <NativeMenu>
          <NativeMenuItem Icon="/Assets/test_icon.ico" Header="Open" Clicked="OnOpenClicked" Gesture="Ctrl+O"/>
          <NativeMenuItemSeperator/><!-- Uses incorrect spelling to demonstrate backwards compatibility -->
          <NativeMenuItem Icon="/Assets/github_icon.png" Header="Recent">
            <NativeMenu/>
          </NativeMenuItem>
          <NativeMenuItemSeparator/>
          <NativeMenuItem Header="{x:Static local:MainWindow.MenuQuitHeader}"
                          Gesture="{x:Static local:MainWindow.MenuQuitGesture}"
                          Clicked="OnCloseClicked" />
        </NativeMenu>
      </NativeMenuItem>
      <NativeMenuItem Header="Edit">
        <NativeMenu>
          <NativeMenuItem Header="Copy"/>
          <NativeMenuItem Header="Paste"/>
        </NativeMenu>
      </NativeMenuItem>
      <NativeMenuItem Header="Options">
        <NativeMenu>
          <NativeMenuItem Header="Check Me (None)" 
                          Command="{Binding ToggleMenuItemCheckedCommand}"
                          ToggleType="None"
                          IsChecked="{Binding IsMenuItemChecked}"  />
          <NativeMenuItem Header="Check Me (CheckBox)" 
                          Command="{Binding ToggleMenuItemCheckedCommand}"
                          ToggleType="CheckBox"
                          IsChecked="{Binding IsMenuItemChecked}"  />
          <NativeMenuItem Header="Check Me (Radio)" 
                          Command="{Binding ToggleMenuItemCheckedCommand}"
                          ToggleType="Radio"
                          IsChecked="{Binding IsMenuItemChecked}"  />
        </NativeMenu>
      </NativeMenuItem>
    </NativeMenu>
  </NativeMenu.Menu>

  <Window.DataTemplates>
    <DataTemplate DataType="vm:NotificationViewModel">
      <v:CustomNotificationView />
    </DataTemplate>
  </Window.DataTemplates>
  <Panel>
    <Panel Margin="{Binding #MainWindow.OffScreenMargin}">
      <local:MainView Margin="{Binding #MainWindow.WindowDecorationMargin}" />
    </Panel>
    <Border IsVisible="{Binding ExtendClientAreaEnabled}" BorderThickness="1 1 1 0" CornerRadius="4 4 0 0" BorderBrush="#55000000" Height="22" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="250 8 0 0">
      <Border.Background>
        <SolidColorBrush Color="White" Opacity="0.7" />
      </Border.Background>
      <TextBlock Margin="5 5 5 0" Text="Content In Title Bar" />
    </Border>
  </Panel>
</Window>
