You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MAUI/Segmented-Control/customization.md
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -352,6 +352,56 @@ public partial class MainPage : ContentPage
352
352
353
353

354
354
355
+
## Separator Visibility
356
+
357
+
The [ShowSeparator](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSegmentedControl.html#Syncfusion_Maui_Buttons_SfSegmentedControl_ShowSeparator) property is used to control the visibility of the separator line that appears between the segments in the [SfSegmentedControl](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSegmentedControl.html?tabs=tabid-34%2Ctabid-30%2Ctabid-19%2Ctabid-16%2Ctabid-37%2Ctabid-3%2Ctabid-24%2Ctabid-32%2Ctabid-8%2Ctabid-36%2Ctabid-10%2Ctabid-6%2Ctabid-14%2Ctabid-26%2Ctabid-28%2Ctabid-22%2Ctabid-12%2Ctabid-1). By default, the separator is visible, and setting this property to false hides the separator line.
SfSegmentedControl segmentedControl = new SfSegmentedControl();
387
+
List<SfSegmentItem> itemList = new List<SfSegmentItem>
388
+
{
389
+
new SfSegmentItem() {Text = "Day"},
390
+
new SfSegmentItem() {Text = "Week"},
391
+
new SfSegmentItem() {Text = "Month"},
392
+
new SfSegmentItem() {Text = "Year"},
393
+
};
394
+
segmentedControl.ItemsSource = itemList;
395
+
segmentedControl.ShowSeparator = false;
396
+
this.Content = segmentedControl;
397
+
}
398
+
}
399
+
400
+
{% endhighlight %}
401
+
{% endtabs %}
402
+
403
+

404
+
355
405
## Customize segment items appearance using DataTemplate
356
406
357
407
Use the [SegmentTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSegmentedControl.html#Syncfusion_Maui_Buttons_SfSegmentedControl_SegmentTemplate) property of [SfSegmentedControl](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSegmentedControl.html) to create custom segmented control. The following example code shows how to create a custom segmented control using a data template.
0 commit comments