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-toolkit/Segmented-Control/selection.md
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -457,6 +457,62 @@ public partial class MainPage : ContentPage
457
457
458
458

459
459
460
+
## Enable or Disable Ripple Animation
461
+
462
+
The [SfSegmentedControl](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SegmentedControl.SfSegmentedControl.html?tabs=tabid-34%2Ctabid-30%2Ctabid-19%2Ctabid-16%2Ctabid-3%2Ctabid-24%2Ctabid-32%2Ctabid-8%2Ctabid-36%2Ctabid-10%2Ctabid-6%2Ctabid-14%2Ctabid-37%2Ctabid-26%2Ctabid-28%2Ctabid-22%2Ctabid-12%2Ctabid-1) provides a ripple animation that visually highlights a segment when it is tapped. This effect applies to both default segment items and items defined using custom data templates. You can enable or disable this animation using the `EnableRippleEffect` property. Set `EnableRippleEffect` to true to display the ripple effect when a segment is selected. Set it to false to disable the ripple animation.
SfSegmentedControl segmentedControl = new SfSegmentedControl();
500
+
List<SfSegmentItem> itemList = new List<SfSegmentItem>
501
+
{
502
+
new SfSegmentItem() {Text = "Day"},
503
+
new SfSegmentItem() {Text = "Week"},
504
+
new SfSegmentItem() {Text = "Month"},
505
+
new SfSegmentItem() {Text = "Year"},
506
+
};
507
+
segmentedControl.ItemsSource = itemList;
508
+
segmentedControl.EnableRippleEffect = false;
509
+
this.Content = segmentedControl;
510
+
}
511
+
}
512
+
513
+
{% endhighlight %}
514
+
{% endtabs %}
515
+
460
516
## Notifying segment selection changes
461
517
The [SelectionChanged](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SegmentedControl.SfSegmentedControl.html#Syncfusion_Maui_Toolkit_SegmentedControl_SfSegmentedControl_SelectionChanged) event is triggered once the segment is selected in the segmented control. The [SelectionChangedEventArgs](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SegmentedControl.SelectionChangedEventArgs.html) has the following values, which provide information for the `SelectionChanged` event.
0 commit comments