Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
150412 | Jan 6,2020 02:27 PM UTC | Jan 13,2020 10:33 AM UTC | Xamarin.Android | 3 |
![]() |
Tags: SfSegmentedControl |
Hi Luca,
Greetings from Syncfusion.
We would like to let you know that currently we are revamping our
UG document of Native platforms (Xamarin.Android and Xamarin.iOS) SegmentedControl.
Changes will be reflected in our Volume 1 Service Pack 1 2020 release which is scheduled
to be rolled by end of January 2020.
Query : FontColor
is not Working:
We were able to reproduce the same and currently we have a
workaround to resolve the same by setting FontSize
of SegmentedControl as per in below code snippet
Code
Snippet [C#]:
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState);
SfSegmentedControl segmentedControl = new SfSegmentedControl(this);
segmentedControl.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent,
300);
segmentedControl.SelectionTextColor = Color.Green; segmentedControl.FontColor =
Color.Red; segmentedControl.FontSize = 15;
List<SfSegmentItem> clothList = new List<SfSegmentItem>() {
new SfSegmentItem(){Text = "Item 1"},
new SfSegmentItem(){Text = "Item 2"} };
segmentedControl.ItemsSource =
clothList;
segmentedControl.SegmentHeight = 60;
segmentedControl.SelectionIndicatorSettings = new SelectionIndicatorSettings() {
Position = SelectionIndicatorPosition.Bottom, StrokeThickness = 2
};
segmentedControl.VisibleSegmentsCount = 3;
segmentedControl.DisplayMode = SegmentDisplayMode.Text;
SetContentView(segmentedControl); } |
Query : is it possible to unselect an item if i clck on it
when it is selected?
Currently we don’t have a toggle option
selection in SegmentedControl. Once SegmentedItem has been selected that
selection on same item has been ignored.
Query: i
need to be able to have no one item selected
If your requirement is to clear the entire the selection on
segmented control then, it has been achieved by setting – 1 as SelectedIndex property of SegmentedControl.
Please check and let us know if you need any further assistance.
Regards,
Hemalatha M.
segmentedControl.FontColor = Color.Red;
segmentedControl.FontSize = 15;
but it doesn't work.
thanks
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.