NodeEditor/samples/NodeEditor.Base/App.axaml

73 строки
2.6 KiB
XML

<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:NodeEditorDemo"
xmlns:vm="using:NodeEditorDemo.ViewModels"
xmlns:export="clr-namespace:NodeEditorDemo.Services"
x:CompileBindings="True" x:DataType="vm:MainViewViewModel"
x:Class="NodeEditorDemo.App"
Name="NodeEditor"
RequestedThemeVariant="Dark">
<Application.DataTemplates>
<local:ViewLocator />
</Application.DataTemplates>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<MergeResourceInclude Source="/Styles/Themes.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://NodeEditorAvalonia/Themes/NodeEditorTheme.axaml" />
<StyleInclude Source="avares://NodeEditor.Base/Styles/Nodes.axaml" />
<StyleInclude Source="avares://NodeEditor.Base/Styles/Icons.axaml" />
<Style Selector="MenuItem /template/ ContentPresenter#PART_IconPresenter">
<Setter Property="Width" Value="20" />
<Setter Property="Height" Value="20" />
</Style>
<Style Selector="Separator.horizontal">
<Setter Property="Margin" Value="0" />
<Setter Property="Height" Value="1" />
<Setter Property="Opacity" Value="0.1" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="Background" Value="{DynamicResource SeparatorBackground}" />
</Style>
<Style Selector="Separator.vertical">
<Setter Property="Margin" Value="0" />
<Setter Property="Width" Value="1" />
<Setter Property="Height" Value="NaN" />
<Setter Property="Opacity" Value="0.1" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="Background" Value="{DynamicResource SeparatorBackground}" />
</Style>
<Style Selector="export|ExportRoot">
<Setter Property="(TextElement.FontFamily)" Value="avares://Avalonia.Fonts.Inter/Assets#Inter" />
</Style>
</Application.Styles>
<NativeMenu.Menu>
<NativeMenu>
<NativeMenuItem Header="About NodeEditor"
Command="{Binding AboutCommand}" />
<NativeMenuItemSeparator/>
<NativeMenuItem Header="Quit NodeEditor"
Command="{Binding ExitCommand}"
Gesture="{OnPlatform macOS=CMD+Q, iOS=CMD+Q, Default=Ctrl+Q}"/>
</NativeMenu>
</NativeMenu.Menu>
</Application>