123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <Application xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:vm="using:ControlCatalog.ViewModels"
- x:DataType="vm:ApplicationViewModel"
- Name="Avalonia ControlCatalog"
- x:Class="ControlCatalog.App">
- <Application.Resources>
- <ResourceDictionary>
- <!-- Custom controls defined in other assemblies -->
- <ResourceDictionary.MergedDictionaries>
- <ResourceInclude Source="avares://ControlSamples/HamburgerMenu/HamburgerMenu.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <!-- Resources used only in the control catalog -->
- <ResourceDictionary.ThemeDictionaries>
- <ResourceDictionary x:Key="Default">
- <Color x:Key="CatalogBaseLowColor">#33000000</Color>
- <Color x:Key="CatalogBaseMediumColor">#99000000</Color>
- <Color x:Key="CatalogChromeMediumColor">#FFE6E6E6</Color>
- <Color x:Key="CatalogBaseHighColor">#FF000000</Color>
- </ResourceDictionary>
- <ResourceDictionary x:Key="Dark">
- <Color x:Key="CatalogBaseLowColor">#33FFFFFF</Color>
- <Color x:Key="CatalogBaseMediumColor">#99FFFFFF</Color>
- <Color x:Key="CatalogChromeMediumColor">#FF1F1F1F</Color>
- <Color x:Key="CatalogBaseHighColor">#FFFFFFFF</Color>
- </ResourceDictionary>
- </ResourceDictionary.ThemeDictionaries>
- <!-- Styles attached dynamically depending on current theme (simple or fluent) -->
- <FluentTheme x:Key="FluentTheme" />
- <SimpleTheme x:Key="SimpleTheme" />
- <StyleInclude x:Key="ColorPickerFluent" Source="avares://Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml" />
- <StyleInclude x:Key="ColorPickerSimple" Source="avares://Avalonia.Controls.ColorPicker/Themes/Simple/Simple.xaml" />
- </ResourceDictionary>
- </Application.Resources>
- <Application.Styles>
- <Style Selector="TextBlock.h1, TextBlock.h2, TextBlock.h3">
- <Setter Property="TextWrapping" Value="Wrap" />
- </Style>
- <Style Selector="TextBlock.h1">
- <Setter Property="FontSize" Value="16" />
- <Setter Property="FontWeight" Value="Medium" />
- </Style>
- <Style Selector="TextBlock.h2">
- <Setter Property="FontSize" Value="14" />
- </Style>
- <Style Selector="TextBlock.h3">
- <Setter Property="FontSize" Value="12" />
- </Style>
- <Style Selector="Label.h1">
- <Setter Property="FontSize" Value="16" />
- <Setter Property="FontWeight" Value="Medium" />
- </Style>
- <Style Selector="Label.h2">
- <Setter Property="FontSize" Value="14" />
- </Style>
- <Style Selector="Label.h3">
- <Setter Property="FontSize" Value="12" />
- </Style>
- </Application.Styles>
- <TrayIcon.Icons>
- <TrayIcons>
- <TrayIcon Icon="/Assets/test_icon.ico" MacOSProperties.IsTemplateIcon="true" ToolTipText="Avalonia Tray Icon ToolTip">
- <TrayIcon.Menu>
- <NativeMenu>
- <NativeMenuItem Header="Settings">
- <NativeMenu>
- <NativeMenuItem Header="Option 1" ToggleType="Radio" IsChecked="True" />
- <NativeMenuItem Header="Option 2" ToggleType="Radio" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Header="Option 3" ToggleType="CheckBox" IsChecked="True" />
- <NativeMenuItem Icon="/Assets/test_icon.ico" Header="Restore Defaults" Command="{Binding RestoreDefault}" />
- <NativeMenuItem Header="Disabled option" IsEnabled="False" />
- <NativeMenuItem Header="Hidden option" IsVisible="False" />
- </NativeMenu>
- </NativeMenuItem>
- <NativeMenuItem Header="Exit" Command="{Binding ExitCommand}" />
- </NativeMenu>
- </TrayIcon.Menu>
- </TrayIcon>
- </TrayIcons>
- </TrayIcon.Icons>
- </Application>
|