整理控件库
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
d:DesignWidth="800"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Title="ColorsPage"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}">
|
||||
|
||||
>
|
||||
|
||||
<StackPanel Margin="0,0,0,24">
|
||||
<ui:TextBlock Text="Color provides an intuitive way of communicating information to users in your app: it can be used to indicate interactivity, give feedback to user actions, and give your interface a sense of visual continuity." TextWrapping="WrapWithOverflow" />
|
||||
@@ -31,7 +31,7 @@
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
<Border
|
||||
Margin="0,12,0,0"
|
||||
Background="{ui:ThemeResource ControlFillColorDefaultBrush}"
|
||||
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="12">
|
||||
<StackPanel>
|
||||
@@ -54,9 +54,9 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
Background="{ui:ThemeResource TextFillColorPrimaryBrush}"
|
||||
Background="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
CornerRadius="8,0,0,8"
|
||||
TextElement.Foreground="{ui:ThemeResource TextFillColorInverseBrush}">
|
||||
TextElement.Foreground="{DynamicResource TextFillColorInverseBrush}">
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -73,9 +73,9 @@
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Column="1"
|
||||
Background="{ui:ThemeResource TextFillColorSecondaryBrush}"
|
||||
Background="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
CornerRadius="0"
|
||||
TextElement.Foreground="{ui:ThemeResource TextFillColorInverseBrush}">
|
||||
TextElement.Foreground="{DynamicResource TextFillColorInverseBrush}">
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -92,9 +92,9 @@
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Column="2"
|
||||
Background="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||||
Background="{DynamicResource TextFillColorTertiaryBrush}"
|
||||
CornerRadius="0"
|
||||
TextElement.Foreground="{ui:ThemeResource TextFillColorInverseBrush}">
|
||||
TextElement.Foreground="{DynamicResource TextFillColorInverseBrush}">
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -111,9 +111,9 @@
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Column="3"
|
||||
Background="{ui:ThemeResource TextFillColorDisabledBrush}"
|
||||
Background="{DynamicResource TextFillColorDisabledBrush}"
|
||||
CornerRadius="0,8,8,0"
|
||||
TextElement.Foreground="{ui:ThemeResource TextFillColorInverseBrush}">
|
||||
TextElement.Foreground="{DynamicResource TextFillColorInverseBrush}">
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -137,7 +137,7 @@
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
<Border
|
||||
Margin="0,12,0,0"
|
||||
Background="{ui:ThemeResource ControlFillColorDefaultBrush}"
|
||||
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="12">
|
||||
<StackPanel>
|
||||
@@ -147,7 +147,7 @@
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="42"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{ui:ThemeResource AccentTextFillColorPrimaryBrush}"
|
||||
Foreground="{DynamicResource AccentTextFillColorPrimaryBrush}"
|
||||
Text="Aa" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
@@ -161,9 +161,9 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
Background="{ui:ThemeResource AccentTextFillColorPrimaryBrush}"
|
||||
Background="{DynamicResource AccentTextFillColorPrimaryBrush}"
|
||||
CornerRadius="8,0,0,8"
|
||||
TextElement.Foreground="{ui:ThemeResource TextFillColorInverseBrush}">
|
||||
TextElement.Foreground="{DynamicResource TextFillColorInverseBrush}">
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -180,9 +180,9 @@
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Column="1"
|
||||
Background="{ui:ThemeResource AccentTextFillColorSecondaryBrush}"
|
||||
Background="{DynamicResource AccentTextFillColorSecondaryBrush}"
|
||||
CornerRadius="0"
|
||||
TextElement.Foreground="{ui:ThemeResource TextFillColorInverseBrush}">
|
||||
TextElement.Foreground="{DynamicResource TextFillColorInverseBrush}">
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -199,9 +199,9 @@
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Column="2"
|
||||
Background="{ui:ThemeResource AccentTextFillColorTertiaryBrush}"
|
||||
Background="{DynamicResource AccentTextFillColorTertiaryBrush}"
|
||||
CornerRadius="0"
|
||||
TextElement.Foreground="{ui:ThemeResource TextFillColorInverseBrush}">
|
||||
TextElement.Foreground="{DynamicResource TextFillColorInverseBrush}">
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -218,9 +218,9 @@
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Column="3"
|
||||
Background="{ui:ThemeResource AccentTextFillColorDisabledBrush}"
|
||||
Background="{DynamicResource AccentTextFillColorDisabledBrush}"
|
||||
CornerRadius="0,8,8,0"
|
||||
TextElement.Foreground="{ui:ThemeResource TextFillColorInverseBrush}">
|
||||
TextElement.Foreground="{DynamicResource TextFillColorInverseBrush}">
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -5,14 +5,11 @@ namespace WPFluent.Gallery.Views.Pages.DesignGuidance;
|
||||
/// <summary>
|
||||
/// Interaction logic for IconsPage.xaml
|
||||
/// </summary>
|
||||
public partial class IconsPage : INavigableView<IconsViewModel>
|
||||
public partial class IconsPage
|
||||
{
|
||||
public IconsViewModel ViewModel { get; }
|
||||
|
||||
public IconsPage(IconsViewModel viewModel)
|
||||
public IconsPage()
|
||||
{
|
||||
ViewModel = viewModel;
|
||||
DataContext = this;
|
||||
DataContext = new IconsViewModel();
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
Title="TypographyPage"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
|
||||
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</Grid>
|
||||
|
||||
<controls:TypographyControl
|
||||
Background="{ui:ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
|
||||
Example="Caption"
|
||||
ExampleFontTypography="Caption"
|
||||
SizeLinHeight="12/16"
|
||||
@@ -73,7 +73,7 @@
|
||||
VariableFont="Regular" />
|
||||
|
||||
<controls:TypographyControl
|
||||
Background="{ui:ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
|
||||
Example="Body strong"
|
||||
ExampleFontTypography="BodyStrong"
|
||||
SizeLinHeight="14/20"
|
||||
@@ -86,7 +86,7 @@
|
||||
VariableFont="SemiBold" />
|
||||
|
||||
<controls:TypographyControl
|
||||
Background="{ui:ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
|
||||
Example="Title"
|
||||
ExampleFontTypography="Title"
|
||||
SizeLinHeight="28/36"
|
||||
@@ -99,7 +99,7 @@
|
||||
VariableFont="SemiBold" />
|
||||
|
||||
<controls:TypographyControl
|
||||
Background="{ui:ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
|
||||
Example="Display"
|
||||
ExampleFontTypography="Display"
|
||||
SizeLinHeight="68/92"
|
||||
|
||||
Reference in New Issue
Block a user