Skip to content

Commit ff85e54

Browse files
committed
Added BitmapIconSource sample
1 parent 4ff5fc9 commit ff85e54

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/IconExtensions/IconExtensionsPage.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<SwipeItems Mode="Reveal">
1919
<SwipeItem Text="Accept" IconSource="{ex:FontIconSource Glyph=&#xE10B;}"/>
2020
<SwipeItem Text="Play" IconSource="{ex:SymbolIconSource Glyph=Play}"/>
21+
<SwipeItem IconSource="{ex:BitmapIconSource Source=/Assets/ToolkitLogo.png}"/>
2122
</SwipeItems>
2223
</SwipeControl.LeftItems>
2324
</SwipeControl>

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/IconExtensions/IconExtensionsXaml.bind

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@
4949
HorizontalAlignment="Center" VerticalAlignment="Center"/>
5050
</SwipeControl>
5151

52+
<TextBlock Text="Use the BitmapIconSource extension to create BitmapIconSource items from image paths."
53+
TextWrapping="Wrap"
54+
Style="{StaticResource BodyTextBlockStyle}"/>
55+
56+
<SwipeControl BorderThickness="1"
57+
Background="#40000000"
58+
Width="300" Margin="12" Height="68">
59+
<SwipeControl.LeftItems>
60+
<SwipeItems Mode="Reveal">
61+
<SwipeItem IconSource="{ex:BitmapIconSource Source=/Assets/ToolkitLogo.png}"/>
62+
<SwipeItem IconSource="{ex:BitmapIconSource Source=/Assets/mslogo.png}"/>
63+
</SwipeItems>
64+
</SwipeControl.LeftItems>
65+
<TextBlock Text="Swipe Right"
66+
Margin="12"
67+
HorizontalAlignment="Center" VerticalAlignment="Center"/>
68+
</SwipeControl>
69+
5270
<TextBlock Text="Use the SymbolIconSource extension to create FontIconSource items from known symbols."
5371
TextWrapping="Wrap"
5472
Style="{StaticResource BodyTextBlockStyle}"/>

0 commit comments

Comments
 (0)