16 Ekim 2014 Perşembe

Syncfusion CircularGauge Control : How to Change The Value of a CircularPoint programmatically

If you are developing a Windows Phone 8 app, and couldn't succeed to change the value of a pointer in code behind, you came to the right place :)

You can decleare the Pointer's value by using the instance of gauge which contains the collection of pointers. The following code snippet will work for you:

[C#]

//myGauge is the name I gave to my gauge control
myGauge.MainScale.Pointers[0].Value = 100; 

At this point, you can run into an error which says "The parameter is incorrect" with no explanation. To fix this issue, make sure that the solution platform is "Any CPU".

If you try to specify the Pointer's value by directly accessing pointer instance like below, odds are you will end up with a nullreferenceexception:


[C#]
needlePtr.Value = 100;


One guy from Syncfusion support team wrote me in his email that the fix for this issue will be available in our upcoming Volume 3, 2014 release. As soon as an update is published, I will inform you via my blog.


You can get the sample project from this page.


Thank you...