WIP: init.

This commit is contained in:
rabbitism
2024-02-11 23:43:20 +08:00
parent 8f20e823ca
commit 36bb3b563f
5 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u="https://irihi.tech/ursa">
<!-- Add Resources Here -->
<ControlTheme TargetType="u:NavMenu" x:Key="{x:Type u:NavMenu}">
<Setter Property="Template">
<ControlTemplate TargetType="u:NavMenu">
<ItemsPresenter ItemsPanel="{TemplateBinding ItemsPanel}" Grid.IsSharedSizeScope="True"/>
</ControlTemplate>
</Setter>
</ControlTheme>
<ControlTheme TargetType="u:NavMenuItem" x:Key="{x:Type u:NavMenuItem}">
<Setter Property="Template">
<ControlTemplate TargetType="u:NavMenuItem">
<Expander>
<Expander.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentPresenter Content="{TemplateBinding Icon}" />
<ContentPresenter Grid.Column="1" Content="{TemplateBinding Header}" />
</Grid>
</Expander.Header>
<ItemsPresenter ItemsPanel="{TemplateBinding ItemsPanel}" />
</Expander>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>

View File

@@ -18,6 +18,7 @@
<ResourceInclude Source="Loading.axaml" />
<ResourceInclude Source="MessageBox.axaml" />
<ResourceInclude Source="Navigation.axaml" />
<ResourceInclude Source="NavMenu.axaml" />
<ResourceInclude Source="NumericUpDown.axaml" />
<ResourceInclude Source="Pagination.axaml" />
<ResourceInclude Source="RangeSlider.axaml" />