chore: add avalonia button and brush demo.

This commit is contained in:
NaBian committed 2024-07-17 22:56:54 +08:00
1 parent 63bf5c6aa7
commit 40bb60164e
23 files changed
+1027 -300

No files matched your search

@@ -6,46 +6,55 @@
Margin="16,16,0,16"
CornerRadius="10"
Effect="{StaticResource EffectShadow4}">
<TabControl BorderThickness="0 1 0 0"
SelectionChanged="TabControl_OnSelectionChanged"
ItemsSource="{Binding DemoInfoCollection}"
Background="Transparent"
SelectedIndex="0">
<TabControl.ItemTemplate>
<DataTemplate DataType="data:DemoInfoModel">
<TextBlock Text="{Binding Title}" />
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate DataType="data:DemoInfoModel">
<Panel Margin="10">
<ListBox SelectionMode="Single"
Padding="0"
BorderThickness="0"
SelectedIndex="{Binding SelectedIndex}"
ItemsSource="{Binding DemoItemList}">
<ListBox.ItemTemplate>
<DataTemplate DataType="data:DemoItemModel">
<StackPanel Orientation="Horizontal">
<Rectangle Width="16"
Height="16"
Fill="{Binding ImageBrush}" />
<TextBlock Margin="6,0,0,0"
Text="{Binding Name}" />
<Path IsVisible="{Binding IsNew}"
VerticalAlignment="Center"
Data="{StaticResource NewGeometry}"
Stretch="Uniform"
Margin="10,0,0,0"
Width="30"
Height="14"
Fill="{DynamicResource AccentBrush}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Panel>
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
<DockPanel>
<Button Content="Practical demos"
DockPanel.Dock="Top"
HorizontalAlignment="Stretch"
Margin="10,10,10,4"
BorderThickness="0"
Background="{DynamicResource SecondaryRegionBrush}" />
<TabControl BorderThickness="0 1 0 0"
Classes="inline"
SelectionChanged="TabControl_OnSelectionChanged"
ItemsSource="{Binding DemoInfoCollection}"
Background="Transparent"
SelectedIndex="0">
<TabControl.ItemTemplate>
<DataTemplate DataType="data:DemoInfoModel">
<TextBlock Text="{Binding Title}" />
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate DataType="data:DemoInfoModel">
<Panel Margin="10">
<ListBox SelectionMode="Single"
Padding="0"
BorderThickness="0"
SelectedIndex="{Binding SelectedIndex}"
ItemsSource="{Binding DemoItemList}">
<ListBox.ItemTemplate>
<DataTemplate DataType="data:DemoItemModel">
<StackPanel Orientation="Horizontal">
<Rectangle Width="16"
Height="16"
Fill="{Binding ImageBrush}" />
<TextBlock Margin="6,0,0,0"
Text="{Binding Name}" />
<Path IsVisible="{Binding IsNew}"
VerticalAlignment="Center"
Data="{StaticResource NewGeometry}"
Stretch="Uniform"
Margin="10,0,0,0"
Width="30"
Height="14"
Fill="{DynamicResource AccentBrush}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Panel>
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
</DockPanel>
</UserControl>