-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from SyncfusionExamples/851507_UpdateReadme
851507_Update readme file
- Loading branch information
Showing
1 changed file
with
137 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,141 @@ | ||
# How to customize size of close button in Xamarin.Forms chip group | ||
|
||
[Xamarin.Forms Chips](https://help.syncfusion.com/xamarin/chips/getting-started) allow users to display the information in token representation. These chips arranged manner named ChipGroup. Default mode of [ChipGroup](https://www.syncfusion.com/xamarin-ui-controls/xamarin-chips) is [Input](https://help.syncfusion.com/xamarin/chips/types#input) type and its default size has been customized as per in below | ||
The chip control supports to customize the background color, border color, close button color, and more. The chip control can be customized using the following properties: | ||
|
||
![](https://github.com/SyncfusionExamples/How-to-customize-size-of-close-button-in-Xamarin.Forms-chip-group/blob/main/Close-Button-Customization.gif) | ||
# ShowCloseButton | ||
|
||
The [ShowCloseButton](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfChip.html#Syncfusion_XForms_Buttons_SfChip_ShowCloseButton) property sets the visible state of close button in [SfChip](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfChip.html). | ||
|
||
**[XAML]** | ||
|
||
``` | ||
<ContentPage.Content> | ||
<StackLayout Margin="8,8,8,8" > | ||
<buttons:SfChip Text="James" | ||
WidthRequest="150" | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
ShowCloseButton="true" > | ||
</buttons:SfChip> | ||
</StackLayout> | ||
</ContentPage.Content> | ||
``` | ||
|
||
**[C#]** | ||
|
||
``` | ||
SfChip chip = new SfChip(); | ||
chip.Text = "James"; | ||
chip.WidthRequest = 150; | ||
chip.HorizontalOptions = LayoutOptions.Center; | ||
chip.VerticalOptions = LayoutOptions.Center; | ||
chip.ShowCloseButton = true; | ||
``` | ||
# ShowSelectionIndicator | ||
|
||
The [ShowCloseButton](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfChip.html#Syncfusion_XForms_Buttons_SfChip_ShowSelectionIndicator | ||
) property sets the visible state of close button in [SfChip](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfChip.html). | ||
|
||
**[XAML]** | ||
``` | ||
<buttons:SfChip Text="James" | ||
WidthRequest="150" | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
ShowCloseButton="true" | ||
ShowSelectionIndicator="true" | ||
> | ||
</buttons:SfChip> | ||
``` | ||
**[C#]** | ||
|
||
``` | ||
SfChip chip = new SfChip(); | ||
chip.Text = "James"; | ||
chip.WidthRequest = 150; | ||
chip.HorizontalOptions = LayoutOptions.Center; | ||
chip.VerticalOptions = LayoutOptions.Center; | ||
chip.ShowCloseButton = true; | ||
chip.ShowSelectionIndicator = true; | ||
``` | ||
|
||
# CloseButtonColor | ||
The [CloseButtonColor](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfChip.html#Syncfusion_XForms_Buttons_SfChip_CloseButtonColor) property customizes the color of the close button in [SfChip](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfChip.html). | ||
|
||
**[XAML]** | ||
|
||
``` | ||
<buttons:SfChip Text="James" | ||
WidthRequest="150" | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
ShowCloseButton="true" | ||
CloseButtonColor="White" | ||
> | ||
</buttons:SfChip> | ||
``` | ||
|
||
**[C#]** | ||
|
||
``` | ||
SfChip chip = new SfChip(); | ||
chip.Text = "James"; | ||
chip.ShowCloseButton = true; | ||
chip.CloseButtonColor = Color.White; | ||
``` | ||
# BorderColor | ||
The [BorderColor](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_BorderColor) property customizes the color of border in [SfChip](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfChip.html). | ||
|
||
**[XAML]** | ||
|
||
``` | ||
<buttons:SfChip Text="James" | ||
WidthRequest="150" | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
BorderWidth="4" | ||
BorderColor="Black" | ||
> | ||
</buttons:SfChip> | ||
``` | ||
|
||
**[C#]** | ||
``` | ||
SfChip chip = new SfChip(); | ||
chip.Text = "James"; | ||
chip.WidthRequest = 150; | ||
chip.HorizontalOptions = LayoutOptions.Center; | ||
chip.VerticalOptions = LayoutOptions.Center; | ||
chip.BorderWidth = 4; | ||
chip.BorderColor = Color.Black; | ||
``` | ||
# BorderWidth | ||
The [BorderWidth](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_BorderWidth) property customizes the thickness of border in [SfChip](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfChip.html). | ||
|
||
**[XAML]** | ||
|
||
``` | ||
<buttons:SfChip Text="James" | ||
WidthRequest="150" | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
BorderWidth="8" | ||
BorderColor="Black" | ||
> | ||
</buttons:SfChip> | ||
``` | ||
|
||
**[C#]** | ||
|
||
``` | ||
SfChip chip = new SfChip(); | ||
chip.Text = "James"; | ||
chip.WidthRequest = 150; | ||
chip.HorizontalOptions = LayoutOptions.Center; | ||
chip.VerticalOptions = LayoutOptions.Center; | ||
chip.BorderWidth = 8; | ||
``` |