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 can you use data binding in Gauge with the MVVM pattern?

Platform: Xamarin.Forms |
Control: SfCircularGauge |
Published Date: February 23, 2015 |
Last Revised Date: February 23, 2015 |
Product Version:

In order to achieve data binding in Gauge with MVVM pattern, you can refer the following procedure.

Create a new Forms Xaml Page in the PCL project and include the SfCircularGauge Xaml code in it.

Set the created Forms Xaml page as a MainPage in the constructor of the App class.


Include the required code example for Circular Gauge in the Forms Xaml Page. Here it is named as the HomePage.

Once you have included the Circular Gauge related code examples, set the ViewModel as a BindingContext for the SfCircularGauge.


The ViewModel implements INotifyPropertyChanged, so that the view is notified once the Value property gets changed.


So that Value property in the CircularPointer in the CircularGauge control can be dynamically updated by updating the Value property in the ViewModel.

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment
Renault Hess
Apr 24, 2018

Hi, If I set Needle value to an explicit value, it displays on the app when I run it, however, If I use the binding as above, I get a null reference pointer when the app starts (in debug mode). Any ideas?

Renault Hess
Apr 24, 2018

PS I also have a label independent of the gauge, with the same binding, and when I comment out the Gauge xaml, tie label updates properly

Sri Gayathri Gopalakrishnan [Syncfusion]
Apr 25, 2018

Hi Renault,

We have validated your query and the above code working fine for dynamic binding. Please find the complete sample for the above code,


Sri Gayathri. G


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