2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
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. C# 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. XAML The ViewModel implements INotifyPropertyChanged, so that the view is notified once the Value property gets changed. C# 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.
This page will automatically be redirected to the sign-in page in 10 seconds.
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?
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
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,
http://www.syncfusion.com/downloads/support/directtrac/general/ze/Duration2120625359
Regards,
Sri Gayathri. G
Hi there,
I'm really enjoying the controls library, and I have a perfect use for a radial gauge, however there's no way to customise the label text on the gauge in an mvvm manner!
The LabelCreated event needs to be a binding,
Please advise!
Thanks,Greg