Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info font icons #1297

Merged
merged 7 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
84 changes: 53 additions & 31 deletions WinUIGallery/ControlPages/DesignGuidance/IconsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:AppUIBasics"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
mc:Ignorable="d">

<Page.Resources>
Expand Down Expand Up @@ -101,45 +102,67 @@
</DataTemplate>
</Page.Resources>

<Grid HorizontalAlignment="Stretch">
<Grid HorizontalAlignment="Stretch" RowSpacing="8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical">
<RichTextBlock>
<Paragraph>
With the release of Windows 11, <Hyperlink NavigateUri="https://learn.microsoft.com/windows/apps/design/style/segoe-fluent-icons-font">Segoe Fluent Icons Font</Hyperlink>
is the recommended symbol icon font.<LineBreak />
</Paragraph>
</RichTextBlock>
<TextBlock
Margin="0,8,0,0"
Style="{ThemeResource BodyStrongTextBlockStyle}"
Text="How do I get the font?" />
<RichTextBlock>
<Paragraph>
On Windows 11: There's nothing you need to do, the font comes with Windows.<LineBreak />
On Windows 10: The Segoe Fluent Icons is not included by default on Windows 10. You can download it <Hyperlink NavigateUri="https://learn.microsoft.com/windows/apps/design/downloads/#fonts">here</Hyperlink>
.<LineBreak />
</Paragraph>
</RichTextBlock>
<TextBlock Text="With the release of Windows 11, Segoe Fluent Icons Font is the recommended symbol icon font."/>
Jay-o-Way marked this conversation as resolved.
Show resolved Hide resolved
<labs:SettingsExpander Grid.Row="1"
IsExpanded="False"
Header="Instructions on how to use Segoe Fluent Icons">
<labs:SettingsExpander.Items>
<labs:SettingsCard ContentAlignment="Left" Padding="16,8">
<RichTextBlock TextWrapping="Wrap">
<Paragraph FontWeight="SemiBold">
How to get the font
</Paragraph>
<Paragraph>
On Windows 11: There's nothing you need to do, the font comes with Windows.<LineBreak />
On Windows 10: The Segoe Fluent Icons is not included by default on Windows 10. You can download it
Jay-o-Way marked this conversation as resolved.
Show resolved Hide resolved
<Hyperlink NavigateUri="https://learn.microsoft.com/windows/apps/design/downloads/#fonts">here</Hyperlink>.
</Paragraph>
</RichTextBlock>
</labs:SettingsCard>
<labs:SettingsCard ContentAlignment="Left" Padding="16,8">
<StackPanel Orientation="Vertical" Spacing="8">
<RichTextBlock TextWrapping="Wrap">
<Paragraph FontWeight="SemiBold">
How to use the font
</Paragraph>
<Paragraph>
If you don't specify a <Run FontFamily="Consolas, monospace" FontWeight="Bold">FontFamily</Run>,
or you specify a <Run FontFamily="Consolas, monospace" FontWeight="Bold">FontFamily</Run> that is not available on the system at runtime,
the <Hyperlink NavigateUri="https://learn.microsoft.com/uwp/api/windows.ui.xaml.controls.fonticon">FontIcon</Hyperlink> falls back to the default font family defined by the
<Run FontFamily="Consolas, monospace" FontWeight="Bold">SymbolThemeFontFamily</Run> theme resource.
Jay-o-Way marked this conversation as resolved.
Show resolved Hide resolved
</Paragraph>
</RichTextBlock>
<controls:SampleCodePresenter
SampleType="XAML"
CodeSourceFile="Icons/FontIconSample1_xaml.txt">
Jay-o-Way marked this conversation as resolved.
Show resolved Hide resolved
</controls:SampleCodePresenter>
</StackPanel>
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>

<StackPanel Spacing="8" Grid.Row="2">
Jay-o-Way marked this conversation as resolved.
Show resolved Hide resolved
<TextBlock
Margin="0,8,0,0"
Style="{ThemeResource BodyStrongTextBlockStyle}"
Text="Fluent Icons Library" />
Style="{ThemeResource BodyStrongTextBlockStyle}"
Text="Fluent Icons Library" />
<AutoSuggestBox
MinWidth="304"
MaxWidth="320"
Margin="0,8,0,12"
HorizontalAlignment="Left"
PlaceholderText="Search icons"
QueryIcon="Find"
TextChanged="SearchTextBox_TextChanged" />
MinWidth="304"
MaxWidth="320"
HorizontalAlignment="Left"
PlaceholderText="Search icons"
QueryIcon="Find"
TextChanged="SearchTextBox_TextChanged" />
</StackPanel>

<controls1:SampleThemeListener
Grid.Row="1"
Grid.Row="3"
MaxHeight="600"
VerticalAlignment="Top">
<Grid
Expand Down Expand Up @@ -181,7 +204,6 @@
<TextBlock
Margin="0,0,0,0"
Jay-o-Way marked this conversation as resolved.
Show resolved Hide resolved
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource SubtitleTextBlockStyle}"
Text="{Binding SelectedItem.Name, Mode=OneWay}" />
<FontIcon
Expand Down
5 changes: 3 additions & 2 deletions WinUIGallery/ControlPages/DesignGuidance/TypographyPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
</Grid.RowDefinitions>
<RichTextBlock>
<Paragraph>
Type helps provide structure and hierarchy to UI. The default font for Windows is <Hyperlink NavigateUri="https://learn.microsoft.com/windows/apps/design/downloads/#fonts">Segoe UI Variable</Hyperlink>
. Best practice is to use Regular weight for most text, use Semibold for titles. The minimum values should be 12px Regular, 14px Semibold.</Paragraph>
Type helps provide structure and hierarchy to UI. The default font for Windows is
<Hyperlink NavigateUri="https://learn.microsoft.com/windows/apps/design/downloads/#fonts">Segoe UI Variable</Hyperlink>.
Best practice is to use Regular weight for most text, use Semibold for titles. The minimum values should be 12px Regular, 14px Semibold.</Paragraph>
</RichTextBlock>
<local:ControlExample
x:Name="Example1"
Expand Down
1 change: 0 additions & 1 deletion WinUIGallery/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
<BitmapIcon ShowAsMonochrome="False" UriSource="/Assets/Tiles/SmallTile-sdk.png" />
</labs:SettingsExpander.HeaderIcon>
<TextBlock
Margin="0,-2,0,0"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
IsTextSelectionEnabled="True"
Text="{x:Bind Version}" />
Expand Down