App.xaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <Application xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:vm="using:ControlCatalog.ViewModels"
  4. x:DataType="vm:ApplicationViewModel"
  5. x:CompileBindings="True"
  6. x:Class="ControlCatalog.App">
  7. <Application.Styles>
  8. <Style Selector="TextBlock.h1, TextBlock.h2, TextBlock.h3">
  9. <Setter Property="TextWrapping" Value="Wrap" />
  10. </Style>
  11. <Style Selector="TextBlock.h1">
  12. <Setter Property="FontSize" Value="16" />
  13. <Setter Property="FontWeight" Value="Medium" />
  14. </Style>
  15. <Style Selector="TextBlock.h2">
  16. <Setter Property="FontSize" Value="14" />
  17. </Style>
  18. <Style Selector="TextBlock.h3">
  19. <Setter Property="FontSize" Value="12" />
  20. </Style>
  21. <Style Selector="Label.h1">
  22. <Setter Property="FontSize" Value="16" />
  23. <Setter Property="FontWeight" Value="Medium" />
  24. </Style>
  25. <Style Selector="Label.h2">
  26. <Setter Property="FontSize" Value="14" />
  27. </Style>
  28. <Style Selector="Label.h3">
  29. <Setter Property="FontSize" Value="12" />
  30. </Style>
  31. <StyleInclude Source="avares://ControlSamples/HamburgerMenu/HamburgerMenu.xaml" />
  32. </Application.Styles>
  33. <TrayIcon.Icons>
  34. <TrayIcons>
  35. <TrayIcon Icon="/Assets/test_icon.ico" ToolTipText="Avalonia Tray Icon ToolTip">
  36. <TrayIcon.Menu>
  37. <NativeMenu>
  38. <NativeMenuItem Header="Settings">
  39. <NativeMenu>
  40. <NativeMenuItem Header="Option 1" ToggleType="Radio" IsChecked="True" Command="{Binding ToggleCommand}" />
  41. <NativeMenuItem Header="Option 2" ToggleType="Radio" IsChecked="True" Command="{Binding ToggleCommand}" />
  42. <NativeMenuItemSeparator />
  43. <NativeMenuItem Header="Option 3" ToggleType="CheckBox" IsChecked="True" Command="{Binding ToggleCommand}" />
  44. <NativeMenuItem Icon="/Assets/test_icon.ico" Header="Restore Defaults" Command="{Binding ToggleCommand}" />
  45. </NativeMenu>
  46. </NativeMenuItem>
  47. <NativeMenuItem Header="Exit" Command="{Binding ExitCommand}" />
  48. </NativeMenu>
  49. </TrayIcon.Menu>
  50. </TrayIcon>
  51. </TrayIcons>
  52. </TrayIcon.Icons>
  53. </Application>