整理控件库

This commit is contained in:
GG Z
2025-05-05 17:04:06 +08:00
parent 74532b77be
commit 3eaad7566e
283 changed files with 2156 additions and 17846 deletions

View File

@@ -8,14 +8,14 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="clr-namespace:WPFluent.Gallery.Models"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
xmlns:vm="clr-namespace:WPFluent.Gallery.ViewModels.Pages"
Title="IconsPage"
controls:PageControlDocumentation.DocumentationType="{x:Type ui:SymbolIcon}"
d:DataContext="{d:DesignInstance local:IconsPage,
d:DataContext="{d:DesignInstance vm:IconsViewModel,
IsDesignTimeCreatable=False}"
d:DesignHeight="450"
d:DesignWidth="800"
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
ScrollViewer.CanContentScroll="False"
mc:Ignorable="d">
@@ -49,18 +49,11 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:AutoSuggestBox
Grid.Column="0"
MinWidth="320"
Margin="0,4,0,0"
HorizontalAlignment="Left"
PlaceholderText="Search icons"
Text="{Binding ViewModel.AutoSuggestBoxText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox
Grid.Column="1"
MinWidth="0"
Margin="12,0,0,0"
Command="{Binding ViewModel.CheckboxCheckedCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:IconsPage}, Mode=OneWay}"
Command="{Binding DataContext.CheckboxCheckedCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:IconsPage}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}, Mode=OneWay}"
Content="Is filled" />
</Grid>
@@ -73,13 +66,13 @@
<Border
Grid.Column="0"
BorderBrush="{ui:ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{DynamicResource CardBackgroundFillColorDefaultBrush}"
BorderThickness="1,1,0,0"
CornerRadius="8,0,0,0">
<ui:VirtualizingItemsControl
Margin="0,24,4,0"
Padding="0"
ItemsSource="{Binding ViewModel.FilteredIconsCollection, Mode=OneWay}"
ItemsSource="{Binding FilteredIconsCollection, Mode=OneWay}"
VirtualizingPanel.CacheLengthUnit="Pixel">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type models:DisplayableIcon}">
@@ -90,7 +83,7 @@
Padding="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Command="{Binding ViewModel.IconSelectedCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:IconsPage}}"
Command="{Binding DataContext.IconSelectedCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:IconsPage}}"
CommandParameter="{Binding Path=Id, Mode=OneTime}"
ToolTip="{Binding Name, Mode=OneTime}"
ToolTipService.InitialShowDelay="240">
@@ -106,73 +99,46 @@
<Border
Grid.Column="1"
MinWidth="300"
Background="{ui:ThemeResource CardBackgroundFillColorSecondaryBrush}"
BorderBrush="{ui:ThemeResource CardBackgroundFillColorDefaultBrush}"
Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
BorderBrush="{DynamicResource CardBackgroundFillColorDefaultBrush}"
BorderThickness="0,1,1,0"
CornerRadius="0,8,0,0">
<Grid Margin="24">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ui:StackPanel Spacing="10" Margin="24">
<ui:TextBlock
Grid.Row="0"
FontTypography="BodyStrong"
Text="{Binding ViewModel.SelectedSymbolName, Mode=OneWay}" />
Text="{Binding SelectedSymbolName, Mode=OneWay}" />
<ui:SymbolIcon
Grid.Row="1"
Margin="0,30,0,24"
HorizontalAlignment="Left"
Filled="{Binding ViewModel.IsIconFilled, Mode=OneWay}"
Filled="{Binding IsIconFilled, Mode=OneWay}"
FontSize="62"
Symbol="{Binding ViewModel.SelectedSymbol, Mode=OneWay}" />
Symbol="{Binding SelectedSymbol, Mode=OneWay}" />
<ui:TextBlock
Grid.Row="2"
FontTypography="BodyStrong"
Text="Icon name" />
<ui:TextBlock
Grid.Row="3"
Foreground="{ui:ThemeResource TextFillColorSecondaryBrush}"
Text="{Binding ViewModel.SelectedSymbolName, Mode=OneWay}" />
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Text="{Binding SelectedSymbolName, Mode=OneWay}" />
<ui:TextBlock
Grid.Row="4"
Margin="0,8,0,0"
FontTypography="BodyStrong"
Text="Unicode point" />
<ui:TextBlock
Grid.Row="5"
Foreground="{ui:ThemeResource TextFillColorSecondaryBrush}"
Text="{Binding ViewModel.SelectedSymbolUnicodePoint, Mode=OneWay}" />
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Text="{Binding SelectedSymbolUnicodePoint, Mode=OneWay}" />
<ui:TextBlock
Grid.Row="6"
Margin="0,8,0,0"
FontTypography="BodyStrong"
Text="Text glyph" />
<ui:TextBlock
Grid.Row="7"
Foreground="{ui:ThemeResource TextFillColorSecondaryBrush}"
Text="{Binding ViewModel.SelectedSymbolTextGlyph, Mode=OneWay}" />
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Text="{Binding SelectedSymbolTextGlyph, Mode=OneWay}" />
<ui:TextBlock
Grid.Row="8"
Margin="0,8,0,0"
FontTypography="BodyStrong"
Text="XAML" />
<ui:TextBlock
Grid.Row="9"
MaxWidth="250"
Foreground="{ui:ThemeResource TextFillColorSecondaryBrush}"
Text="{Binding ViewModel.SelectedSymbolXaml, Mode=OneWay}"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Text="{Binding SelectedSymbolXaml, Mode=OneWay}"
TextWrapping="WrapWithOverflow" />
</Grid>
</ui:StackPanel>
</Border>
</Grid>
</Grid>