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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding gauge to canvas on RT and Phone

Thread ID:





118963 Apr 28,2015 07:48 PM UTC May 4,2015 10:42 AM UTC WinRT 3
Tags: SfCircularGauge
Mike Cowing
Asked On April 28, 2015 07:48 PM UTC

Ideally I want to set the background colour of the face, i.e. the bit inside the main scale. 
I've not figured a way of doing this so I've resorted to putting an ellipse in behind it. On the page I'm using as a test this works fine and it's all sitting inside a Grid. 

However I'm using the gauge as a Style, which has dependency properties backing some of the values, which is referenced via a DataTemplate as part of a an ItemsControl control. Sounds convoluted, but I've been led to believe this is the best way for what I'm trying to do. But as soon as I display the gauge then the relationship is lost  between the location of the ellipse and the location of the gauge.

So I tried putting the gauge and ellipse inside a canvas, so it would keep this relationship, but as soon as I do that the I get an error in the XAML designer: TypeLoadException: Could not find Windows Runtime type 'Windows.UI.Xaml.Controls.RelativeSource'.

Can the control not sit in a Canvas? or ViewBox?

Even on a new, blank app, as soon as I do this it errors out. Is there a way around this?


Vigneshkumar Ramasamy [Syncfusion]
Replied On April 30, 2015 07:30 AM UTC

Hi Mike

We are able to reproduce the mentioned issue” error occurs when adding the SfCircularGauge inside the canvas panel” and we have logged an issue report on this and the fixfor this issue will included in our Service Pack 2 Volume 1, 2015 release. And also the issue can be resolved in sample level by setting Width and Height to the SfCircularGauge as in the below code snippet.

Code Snippet:

<Canvas Width="500" Height="500">

<syncfusion:SfCircularGauge Width="500" Height="500" ></syncfusion:SfCircularGauge>

<Ellipse Width="100" Height="100" Canvas.Top="200" Canvas.Left="200" Fill="Yellow"></Ellipse>


Please let us know if you have any concerns.
Vigneshkumar R.

Mike Cowing
Replied On May 1, 2015 12:36 PM UTC

Thanks. I'll try the workaround when I'm back in the UK.

Cheers, Mike...

Vigneshkumar Ramasamy [Syncfusion]
Replied On May 4, 2015 10:42 AM UTC

Hi Mike,

Thanks for the update. Please let us know if you require further assistance on this.


Vigneshkumar R.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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