Skip to content

Commit

Permalink
add x namespace to name
Browse files Browse the repository at this point in the history
  • Loading branch information
karkarl committed Aug 15, 2023
1 parent 6ddf021 commit 79dc855
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions WinUIGallery/ControlPages/IconElementPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,67 @@
xmlns:local="using:AppUIBasics"
mc:Ignorable="d">
<StackPanel>
<local:ControlExample Name="Example1" HeaderText="A BitmapIcon with a multicolor bitmap image">
<local:ControlExample x:Name="Example1" HeaderText="A BitmapIcon with a multicolor bitmap image">
<local:ControlExample.Example>
<StackPanel>
<TextBlock Text="The ShowAsMonochrome property (true by default) will result in a solid block of the foreground color if the property is set to true and the icon is more than one color. This behavior can be ignored by setting the ShowAsMonochrome property to false." Style="{ThemeResource BodyTextBlockStyle}" Margin="0,0,0,12" />
<BitmapIcon Name="SlicesIcon" UriSource="ms-appx:///Assets/slices.png" Width="50" HorizontalAlignment="Left" ShowAsMonochrome="False"/>
<BitmapIcon x:Name="SlicesIcon" UriSource="ms-appx:///Assets/slices.png" Width="50" HorizontalAlignment="Left" ShowAsMonochrome="False"/>
</StackPanel>
</local:ControlExample.Example>
<local:ControlExample.Options>
<CheckBox x:Name="MonochromeButton" Content="Monochrome" IsChecked="{x:Bind SlicesIcon.ShowAsMonochrome, Mode=TwoWay}"/>
</local:ControlExample.Options>
<local:ControlExample.Xaml>
<x:String>
&lt;BitmapIcon Name="SlicesIcon" UriSource="ms-appx:///Assets/slices.png" Width="50" ShowAsMonochrome="$(ShowAsMonochrome)"/&gt;
&lt;BitmapIcon x:Name="SlicesIcon" UriSource="ms-appx:///Assets/slices.png" Width="50" ShowAsMonochrome="$(ShowAsMonochrome)"/&gt;
</x:String>
</local:ControlExample.Xaml>
<local:ControlExample.Substitutions>
<local:ControlExampleSubstitution Key="ShowAsMonochrome" Value="{ x:Bind MonochromeButton.IsChecked.Value, Mode=OneWay}"/>
</local:ControlExample.Substitutions>
</local:ControlExample>
<local:ControlExample Name="Example2" HeaderText="A FontIcon using a glyph from a specific font family in a button" XamlSource="Icons/FontIconSample1_xaml.txt">
<local:ControlExample x:Name="Example2" HeaderText="A FontIcon using a glyph from a specific font family in a button" XamlSource="Icons/FontIconSample1_xaml.txt">
<local:ControlExample.Example>
<StackPanel>
<TextBlock Text="Use FontIcon as the icon for a control if you want to specify a Glyph value from a FontFamily. Windows 10 uses the Segoe MDL2 Assets FontFamily and that is what this example is showing." Style="{ThemeResource BodyTextBlockStyle}" Margin="0,0,0,12" />
<Button Name="ExampleButton1">
<Button x:Name="ExampleButton1" AutomationProperties.Name="ExampleButton1">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE790;"/>
</Button>
</StackPanel>
</local:ControlExample.Example>
</local:ControlExample>
<local:ControlExample Name="Example3" HeaderText="A ImageIcon using a bitmap image in a button" XamlSource="Icons/ImageIconSample1_xaml.txt">
<local:ControlExample x:Name="Example3" HeaderText="A ImageIcon using a bitmap image in a button" XamlSource="Icons/ImageIconSample1_xaml.txt">
<local:ControlExample.Example>
<StackPanel>
<TextBlock Text="To use an ImageIcon as the icon for a control, you can set image that has a file format supported by the Image class. The two examples here show a PNG and SVG image as the icon." Style="{ThemeResource BodyTextBlockStyle}" Margin="0,0,0,12" />
<Button Name="ImageExample1" Width="100">
<Button x:Name="ImageExample1" AutomationProperties.Name="ImageExample1" Width="100">
<ImageIcon Source="/Assets/slices.png"/>
</Button>
</StackPanel>
</local:ControlExample.Example>
</local:ControlExample>
<local:ControlExample Name="Example4" HeaderText="A ImageIcon using a SVG image in a button" XamlSource="Icons/ImageIconSample2_xaml.txt">
<local:ControlExample x:Name="Example4" HeaderText="A ImageIcon using a SVG image in a button" XamlSource="Icons/ImageIconSample2_xaml.txt">
<local:ControlExample.Example>
<Button Name="ImageExample2">
<Button x:Name="ImageExample2" AutomationProperties.Name="ImageExample2">
<ImageIcon Source="https://raw.githubusercontent.com/DiemenDesign/LibreICONS/master/svg-color/libre-camera-panorama.svg" Width="50"/>
</Button>
</local:ControlExample.Example>
</local:ControlExample>
<local:ControlExample Name="Example5" HeaderText="A PathIcon in a button" XamlSource="Icons/PathIconSample1_xaml.txt">
<local:ControlExample x:Name="Example5" HeaderText="A PathIcon in a button" XamlSource="Icons/PathIconSample1_xaml.txt">
<local:ControlExample.Example>
<StackPanel>
<TextBlock Text="To use a PathIcon as the icon for a control, you specify the path data of the image you are trying to display. The path data draws a series of connected lines and curves." Style="{ThemeResource BodyTextBlockStyle}" Margin="0,0,0,12" />
<Button Name="Example1Button">
<Button x:Name="Example1Button" AutomationProperties.Name="Example1Button">
<PathIcon Data="F1 M 16,12 20,2L 20,16 1,16" HorizontalAlignment="Center"/>
</Button>
</StackPanel>
</local:ControlExample.Example>
</local:ControlExample>
<local:ControlExample Name="Example6" HeaderText="A SymbolIcon in a button" XamlSource="Icons/SymbolIconSample_1_xaml.txt">
<local:ControlExample x:Name="Example6" HeaderText="A SymbolIcon in a button" XamlSource="Icons/SymbolIconSample_1_xaml.txt">
<local:ControlExample.Example>
<StackPanel>
<TextBlock Text="To use a SymbolIcon as the icon for a control, you specify the enum value for the glyph you would like to display. SymbolIcon's enum is based off of icons from the Segoe MDL2 font used by Windows 10." Style="{ThemeResource BodyTextBlockStyle}" Margin="0,0,0,12" />
<Button Name="AcceptButton">
<Button x:Name="AcceptButton" AutomationProperties.Name="AcceptButton">
<StackPanel>
<SymbolIcon Symbol="Accept"/>
<TextBlock Text="Accept"/>
Expand Down

0 comments on commit 79dc855

Please sign in to comment.