feat: initialize, setup demo. make sure MVVM works.

This commit is contained in:
rabbitism
2024-02-21 02:15:30 +08:00
parent 3247a37105
commit 76da0b3616
16 changed files with 313 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<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 x:Key="{x:Type u:ToolBar}" TargetType="u:ToolBar">
<Setter Property="ItemsPanel">
<ItemsPanelTemplate>
<u:ToolBarPanel/>
</ItemsPanelTemplate>
</Setter>
<Setter Property="Template">
<ControlTemplate TargetType="u:ToolBar">
<Border
Padding="2"
Theme="{DynamicResource CardBorder}"
CornerRadius="4">
<StackPanel Orientation="{TemplateBinding Orientation}">
<Rectangle
Width="1"
VerticalAlignment="Stretch"
Margin="4 0"
Fill="Gray" />
<ContentPresenter Margin="4 0" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" />
<ItemsPresenter VerticalAlignment="Center" HorizontalAlignment="Left" ItemsPanel="{TemplateBinding ItemsPanel}"/>
<Button Content="More"></Button>
<Popup>
<Border Theme="{DynamicResource CardBorder}">
<StackPanel Name="{x:Static u:ToolBar.PART_OverflowPanel}"></StackPanel>
</Border>
</Popup>
</StackPanel>
</Border>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>