Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions WinUIGallery/Models/IconData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class IconData
public string Name { get; set; }
public string Code { get; set; }
public string[] Tags { get; set; } = [];
public bool IsSegoeFluentOnly { get; set; }

public string Character => char.ConvertFromUtf32(Convert.ToInt32(Code, 16));
public string CodeGlyph => "\\u" + Code;
Expand Down
52 changes: 39 additions & 13 deletions WinUIGallery/Samples/ControlPages/Design/IconographyPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="{StaticResource ControlCornerRadius}">

<!-- Icon -->
<Viewbox
Width="28"
Expand Down Expand Up @@ -192,19 +193,44 @@
Visibility="Collapsed">
<ScrollViewer>
<StackPanel Margin="16,16,8,16" Spacing="2">
<Border
Margin="0,0,0,24"
Padding="8"
HorizontalAlignment="Left"
Background="{ThemeResource ControlFillColorDefaultBrush}"
BorderBrush="{ThemeResource ControlStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="{StaticResource ControlCornerRadius}">
<FontIcon
FontFamily="{StaticResource SymbolThemeFontFamily}"
FontSize="48"
Glyph="{Binding SelectedItem.Character, Mode=OneWay}" />
</Border>
<Grid Margin="0,0,0,24"
HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border Margin="0,0,8,0"
Padding="8"
HorizontalAlignment="Left"
Background="{ThemeResource ControlFillColorDefaultBrush}"
BorderBrush="{ThemeResource ControlStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="{StaticResource ControlCornerRadius}">
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}"
FontSize="48"
Glyph="{Binding SelectedItem.Character, Mode=OneWay}" />
</Border>
<Grid Grid.Column="1"
HorizontalAlignment="Stretch"
Visibility="{Binding SelectedItem.IsSegoeFluentOnly}"
ToolTipService.ToolTip="This icon is only available in Segoe Fluent Icons (the default icon font on Windows 11). On Windows 10, Segoe MDL2 Assets is used by default, so the icon may not appear unless Segoe Fluent Icons is installed.">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<FontIcon FontSize="16"
Margin="0,6,8,0"
Foreground="{ThemeResource SystemFillColorCriticalBrush}"
Glyph="&#xE7BA;"
VerticalAlignment="Top" />
<TextBlock Grid.Column="1"
Margin="0,0,8,0"
Text="Only supported in Segoe Fluent Icons"
TextWrapping="Wrap"
Foreground="{ThemeResource SystemFillColorCriticalBrush}"
VerticalAlignment="Top" />
</Grid>
</Grid>
<TextBlock
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Style="{StaticResource CaptionTextBlockStyle}"
Expand Down
Loading