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

Commit 17c6b57

Browse files
agaldanaw2agaldanawAgustinBonilla
authored
chips support svg (#17)
Co-authored-by: AndresAldana <agaldanaw@unal.edu.co> Co-authored-by: Agustin Bonilla <agustin.bonilla@horus.com.uy>
1 parent 15a9c14 commit 17c6b57

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

example/ExampleMaterialDesignControls/Pages/MaterialChipsPage.xaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:material="clr-namespace:Plugin.MaterialDesignControls;assembly=Plugin.MaterialDesignControls" x:Class="ExampleMaterialDesignControls.Pages.MaterialChipsPage" Title="MaterialChips">
2+
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:material="clr-namespace:Plugin.MaterialDesignControls;assembly=Plugin.MaterialDesignControls" x:Class="ExampleMaterialDesignControls.Pages.MaterialChipsPage" Title="MaterialChips"
3+
xmlns:ffimageloadingsvg="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms"
4+
>
35
<ContentPage.Content>
46
<ScrollView>
57
<StackLayout Padding="20" Spacing="16">
@@ -31,6 +33,7 @@
3133
<StackLayout>
3234
<material:MaterialChips Margin="0,10,10,0" TrailingIcon="cancel.png" TrailingIconCommand="{Binding IconTapCommand}" IsSelected="false" IsEnabled="true" Text="Opt J" ToUpper="True" />
3335
</StackLayout>
36+
3437
<StackLayout>
3538
<material:MaterialChips Margin="0,10,10,0" TrailingIcon="cancel.png" TrailingIconCommand="{Binding IconTapCommand}" TrailingIconCommandParameter="Option K Clicked" IsSelected="false" IsEnabled="true" Text="This is option K" ToUpper="True" />
3639
</StackLayout>
@@ -40,6 +43,20 @@
4043
<StackLayout>
4144
<material:MaterialChips Margin="0,10,10,0" LeadingIcon="delete.png" LeadingIconCommand="{Binding IconTapCommand}" LeadingIconCommandParameter="Delete command!" IsSelected="false" IsEnabled="true" Text="Option M" ToUpper="True" />
4245
</StackLayout>
46+
<StackLayout>
47+
<material:MaterialChips Margin="0,10,10,0" TrailingIconCommand="{Binding IconTapCommand}" IsSelected="false" IsEnabled="true" Text="Opt A" ToUpper="True" >
48+
<material:MaterialChips.CustomTrailingIcon>
49+
<ffimageloadingsvg:SvgCachedImage Source="resource://ExampleMaterialDesignControls.Resources.Svg.ic_show_password_g.svg"/>
50+
</material:MaterialChips.CustomTrailingIcon>
51+
</material:MaterialChips>
52+
</StackLayout>
53+
<StackLayout>
54+
<material:MaterialChips Margin="0,10,10,0" LeadingIconCommand="{Binding IconTapCommand}" LeadingIconCommandParameter="Delete command!" IsSelected="false" IsEnabled="true" Text="Opt Z" ToUpper="True" >
55+
<material:MaterialChips.CustomLeadingIcon>
56+
<ffimageloadingsvg:SvgCachedImage Source="resource://ExampleMaterialDesignControls.Resources.Svg.ic_dont_show_password_g.svg"/>
57+
</material:MaterialChips.CustomLeadingIcon>
58+
</material:MaterialChips>
59+
</StackLayout>
4360
</FlexLayout>
4461
<material:MaterialButton Text="Save" Icon="save.png" Command="{Binding TapCommand}" Margin="0,0,0,20" VerticalOptions="EndAndExpand" />
4562
</StackLayout>

0 commit comments

Comments
 (0)