Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 5487cd8

Browse files
Add sample of svg image to MaterialSelection
1 parent 17c6b57 commit 5487cd8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

example/ExampleMaterialDesignControls/Pages/MaterialSelectionPage.xaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:material="clr-namespace:Plugin.MaterialDesignControls;assembly=Plugin.MaterialDesignControls"
5+
xmlns:ffimageloadingsvg="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms"
56
x:Class="ExampleMaterialDesignControls.Pages.MaterialSelectionPage"
67
Title="MaterialSelection">
78
<ContentPage.Content>
89
<ScrollView>
910
<StackLayout Padding="16" Spacing="16">
10-
<material:MaterialSelection Type="Filled" LeadingIcon="calendar.png" LabelText="User" Placeholder="Select user" Text="{Binding SelectedText}" Command="{Binding TapCommand}" CommandParameter="User selection" />
11+
<material:MaterialSelection Type="Filled" LeadingIcon="calendar.png" LabelText="User" Placeholder="Select user" Text="{Binding SelectedText}" Command="{Binding TapCommand}" CommandParameter="User selection">
12+
<material:MaterialSelection.CustomTrailingIcon>
13+
<ffimageloadingsvg:SvgCachedImage Source="resource://ExampleMaterialDesignControls.Resources.Svg.ic_dont_show_password_g.svg"/>
14+
</material:MaterialSelection.CustomTrailingIcon>
15+
</material:MaterialSelection>
1116
<material:MaterialSelection Type="Filled" LabelText="User" Placeholder="Select user" Text="{Binding SelectedText}" Command="{Binding TapCommand}" CommandParameter="User selection" />
1217
<material:MaterialSelection Type="Filled" LabelText="User" Placeholder="Select user" Text="{Binding SelectedText}" Command="{Binding TapCommand}" CommandParameter="User selection" IsEnabled="False" />
1318
<material:MaterialSelection Type="Outlined" LabelText="Product" Placeholder="Select product" Text="{Binding SelectedText}" Command="{Binding TapCommand}" CommandParameter="Product selection" HorizontalTextAlignment="Center" />

0 commit comments

Comments
 (0)