This control is a custom implementation of a segmented control. You can customize some properties that we show in Documentation topic.
View Material Design documentation
<material3:MaterialSegmented BackgroundColor="White"
Command="{Binding SelectCommand}"
CornerRadius="20"
HeightRequest="50"
AllowMultiselect="True"
ItemsSource="{Binding Sizes}"
SelectedColor="#8959c0"
SelectedItem="{Binding SelectedSize}"
UnselectedColor="White"
UnselectedTextColor="#8959c0" />
This property is to select the type of the MaterialSegmented control. By default is Outlined
- Filled
- Outlined
This property is to add an event when the value change on the control.
This property is to set the color of the border control when it is enabled. By default is gray. This property only works with type Outlined
This property is to set the color of the control when it is enabled. By default is white. This property only works with type Filled
This property is to set the color of the control when it is disabled. By default is white. This property only works with type Filled
This property is to set the color of the selected segment when it is enabled.
This property is to set the color of the selected segment when it is disabled.
This property is to set the color of the unselected segments when it is enabled.
This property is to set the color of the unselected segments when it is disabled.
This property is to set if you want to allow multiselect items.
This property is for displaying list of data. You should set a List of MaterialSegmentedItem. Its definition is:
- Text (string) : Text showed
- SelectedIcon (string): Icon used when item is selected
- CustomSelectedIcon (view): Custom view used the item is selected
- UnselectedIcon (string): Icon used when item is Unselected
- CustomUnselectedIcon (view): Custom view used when item is Unselected
- IsSelected (bool) : by default you can select an item or items in case multiple select is allowed.
This property is the selected item of the control.
This property is to set cornerradius of the control. By default is 16.
This property is to set heightrequest of the control. By default is 42.
This property is to set the separation of each segment inside the control, this applies to left, top, right and bottom. by default is 0.
This property is to set the textcolor of the selected segment when it is enabled. By default is white.
This property is to set the textcolor of the selected segment when it is disabled. By default is white.
This property is to set the textcolor of the unselected segments when it is enabled. By default is gray.
This property is to set the textcolor of the unselected segments when it is disabled. By default is lightgray.
This property is to set the fontsize of the segment text.
This propperty is to set the fontfamily of the segment text.
This property is to set the fontsize of the selected segment text.
This propperty is to set the fontfamily of the selected segment text.
This property is to set if the control is enabled or not. By default is True.
This property is to bind on the viewmodel.
This property is to set the parameter of the Command property.