We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to bind scale collection to SfCircularGauge

Platform: Xamarin.Forms |
Control: SfCircularGauge

The Scales property in the SfCircularGauge control is used to bind a collection of scales in SfSCircularGuage. The following steps describe how to bind the scales collection.


Create a ViewModel class and declare the property type as ObservableCollection<Scale>. Define each scale with the required properties and add them to the scales collection.


Refer to the following code snippet for defining the collection property in view model.



public ObservableCollection<Scale> Scales
public ViewModel()
       Scales = new ObservableCollection<Scale>()
            new Scale()
                StartValue =0, EndValue=240,
                Interval =20, MinorTicksPerInterval=1,
                LabelOffset =0.8
            new Scale()
                StartValue =0, EndValue=160,
                Interval =40, MinorTicksPerInterval=1, LabelOffset=0.45,
                ScaleStartOffset =0.6, ScaleEndOffset =0.58,
                MajorTickSettings =new TickSettings()
                MinorTickSettings =new TickSettings()


Bind the collection property defined in the ViewModel to the Scales property of circular gauge as demonstrated in the following code snippet.


Code snippet



<gauge:SfCircularGauge  Scales="{Binding Scales}">


Refer the below snippet for setting binding context.






Binding the scale collection to SfCircularGauge

You can download the sample from the following link: Sample

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile