大量更新
This commit is contained in:
@@ -1,26 +1,24 @@
|
||||
<UserControl
|
||||
Height="Auto"
|
||||
Width="Auto"
|
||||
x:Class="NeoUITest.ColorPaletteControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:local="clr-namespace:NeoUITest"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:NeoUITest">
|
||||
<UserControl.Resources>
|
||||
<DataTemplate x:Key="ColorItemTemplate">
|
||||
<Border
|
||||
Margin="4"
|
||||
Background="{Binding Value}"
|
||||
BorderBrush="#CCC"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8"
|
||||
Margin="4">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
CornerRadius="8">
|
||||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Ellipse
|
||||
Fill="{Binding Value}"
|
||||
Width="32"
|
||||
Height="32"
|
||||
Margin="8,0"
|
||||
Fill="{Binding Value}"
|
||||
Stroke="#888"
|
||||
StrokeThickness="1"
|
||||
Width="32" />
|
||||
StrokeThickness="1" />
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
FontWeight="SemiBold"
|
||||
@@ -33,19 +31,19 @@
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="BrushItemTemplate">
|
||||
<Border
|
||||
Margin="4"
|
||||
Background="{Binding Value}"
|
||||
BorderBrush="#CCC"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8"
|
||||
Margin="4">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
CornerRadius="8">
|
||||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Ellipse
|
||||
Fill="{Binding Value}"
|
||||
Width="32"
|
||||
Height="32"
|
||||
Margin="8,0"
|
||||
Fill="{Binding Value}"
|
||||
Stroke="#888"
|
||||
StrokeThickness="1"
|
||||
Width="32" />
|
||||
StrokeThickness="1" />
|
||||
<StackPanel>
|
||||
<TextBlock FontWeight="SemiBold" Text="{Binding Key}" />
|
||||
<TextBlock FontSize="12" Text="{Binding Value.Color}" />
|
||||
@@ -54,26 +52,26 @@
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
<!-- 新增颜色分组 -->
|
||||
<CollectionViewSource Source="{Binding ColorResources}" x:Key="ColorGroups">
|
||||
<CollectionViewSource x:Key="ColorGroups" Source="{Binding ColorResources}">
|
||||
<CollectionViewSource.GroupDescriptions>
|
||||
<PropertyGroupDescription PropertyName="Prefix" />
|
||||
</CollectionViewSource.GroupDescriptions>
|
||||
</CollectionViewSource>
|
||||
<CollectionViewSource Source="{Binding BrushResources}" x:Key="BrushGroups">
|
||||
<CollectionViewSource x:Key="BrushGroups" Source="{Binding BrushResources}">
|
||||
<CollectionViewSource.GroupDescriptions>
|
||||
<PropertyGroupDescription PropertyName="Prefix" />
|
||||
</CollectionViewSource.GroupDescriptions>
|
||||
</CollectionViewSource>
|
||||
</UserControl.Resources>
|
||||
<StackPanel
|
||||
Background="Transparent"
|
||||
Margin="16"
|
||||
Background="Transparent"
|
||||
Orientation="Vertical">
|
||||
<StackPanel Visibility="Collapsed">
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
FontSize="14"
|
||||
FontWeight="Bold"
|
||||
Margin="0,0,0,8"
|
||||
Text="颜色资源" />
|
||||
<!-- 用 ListView 支持分组 -->
|
||||
<ListView
|
||||
@@ -107,9 +105,9 @@
|
||||
<GroupStyle.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock
|
||||
Margin="0,8,0,4"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Margin="0,8,0,4"
|
||||
Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</GroupStyle.HeaderTemplate>
|
||||
@@ -119,9 +117,9 @@
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
Margin="16,12,0,8"
|
||||
FontSize="14"
|
||||
FontWeight="Bold"
|
||||
Margin="16,12,0,8"
|
||||
Text="画刷资源"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
<ListView
|
||||
@@ -154,9 +152,9 @@
|
||||
<GroupStyle.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock
|
||||
Margin="0,8,0,4"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Margin="0,8,0,4"
|
||||
Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</GroupStyle.HeaderTemplate>
|
||||
|
||||
Reference in New Issue
Block a user