MainWindow.xaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <Window xmlns="https://github.com/avaloniaui" MinWidth="500" MinHeight="300"
  2. Width="1024" Height="800"
  3. xmlns:pages="clr-namespace:ControlCatalog.Pages"
  4. Title="Avalonia Control Gallery"
  5. Icon="/Assets/test_icon.ico"
  6. xmlns:local="clr-namespace:ControlCatalog"
  7. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  8. xmlns:vm="clr-namespace:ControlCatalog.ViewModels"
  9. xmlns:v="clr-namespace:ControlCatalog.Views"
  10. x:Class="ControlCatalog.MainWindow">
  11. <NativeMenu.Menu>
  12. <NativeMenu>
  13. <NativeMenuItem Header="File">
  14. <NativeMenuItem.Menu>
  15. <NativeMenu>
  16. <NativeMenuItem Header="Open" Clicked="OnOpenClicked" Gesture="Ctrl+O"/>
  17. <NativeMenuItemSeperator/>
  18. <NativeMenuItem Header="Recent">
  19. <NativeMenuItem.Menu>
  20. <NativeMenu/>
  21. </NativeMenuItem.Menu>
  22. </NativeMenuItem>
  23. <NativeMenuItemSeperator/>
  24. <NativeMenuItem Header="{x:Static local:MainWindow.MenuQuitHeader}"
  25. Gesture="{x:Static local:MainWindow.MenuQuitGesture}"
  26. Clicked="OnCloseClicked" />
  27. </NativeMenu>
  28. </NativeMenuItem.Menu>
  29. </NativeMenuItem>
  30. <NativeMenuItem Header="Edit">
  31. <NativeMenuItem.Menu>
  32. <NativeMenu>
  33. <NativeMenuItem Header="Copy"/>
  34. <NativeMenuItem Header="Paste"/>
  35. </NativeMenu>
  36. </NativeMenuItem.Menu>
  37. </NativeMenuItem>
  38. </NativeMenu>
  39. </NativeMenu.Menu>
  40. <Window.DataTemplates>
  41. <DataTemplate DataType="vm:NotificationViewModel">
  42. <v:CustomNotificationView />
  43. </DataTemplate>
  44. </Window.DataTemplates>
  45. <DockPanel LastChildFill="True">
  46. <Menu Name="MainMenu" DockPanel.Dock="Top">
  47. <MenuItem Header="File">
  48. <MenuItem Header="Exit" Command="{Binding ExitCommand}" />
  49. </MenuItem>
  50. <MenuItem Header="Help">
  51. <MenuItem Header="About" Command="{Binding AboutCommand}" />
  52. </MenuItem>
  53. </Menu>
  54. <local:MainView />
  55. </DockPanel>
  56. </Window>