Hi Przemyslaw,
Greetings from Syncfusion.
We have created a sample for SfSegmentedControl as per your requirement. When DisplayMode is ImageWithText, items populated in control will be displayed as icons with text.
We have IconFont and Text property in SfSegmentItem to set icon and text in SfSegmentedControl. Please check the code snippet for your reference.
Code Snippet:
new SfSegmentItem(){ IconFont = "6", FontIconFontColor = Color.FromHex("#FFFFFF"), FontColor=Color.FromHex("#FFFFFF"), Text = "Day"}, |
Please use the font.ttf file code on the XAML code as mentioned below.
<buttons:SfSegmentedControl.FontIconFontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="Android" Value="SegmentIcon.ttf" />
<On Platform="UWP" Value="/Assets/SegmentIcon.ttf#segment2" />
<On Platform="iOS" Value="segment2" />
</OnPlatform>
</buttons:SfSegmentedControl.FontIconFontFamily> |
Please download the sample from the below link:
Please refer the following link to know more details about how to set custom font SfSegmentedControl.
Please let us know if you have any concern about this.
Regards,
Muneesh Kumar G.