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
close icon

Unable to view the gauge in a viewbox

Dear Syncfusion Support,

I'm not able to rendere a SfDigitalGauge in a Viewbox, I'm able to view the control in a StackPanel.
Which component should I use to resize a sfdigitalgauge?



Attachment: Desktop_b22fc421.zip

3 Replies

AK Ashwin Kumaravel Syncfusion Team April 28, 2017 07:37 AM UTC

Hi Simone,

Thank you for using Syncfusion Products,

We have validated your query and prepared a sample using DigitalGauge which is placed inside the ViewBox. Since DigitalGauge is drawn using Canvas, we need to set height and width explicitly in order to render the control inside the ViewBox. Adding any graphical primitives into Canvas (for example Rectangle) will not render inside the ViewBox until we set height and width to the element. Because default height and width of the Canvas is Zero.

Check the below link for your references,

Link- https://social.msdn.microsoft.com/Forums/vstudio/en-US/d268dd9d-c349-4a00-bda6-7a6eed27560c/canvas-does-not-displayed-when-inside-viewbox?forum=wpf  

Please download the sample from the below link.

Sample Link-DigitalGauge


Please get back us if you have any concern


SS Simone Sarzano April 28, 2017 07:45 AM UTC

Dear Ashwin,

thanks a lot for your sample and your help.


AK Ashwin Kumaravel Syncfusion Team May 1, 2017 08:53 AM UTC

Hi Simone,
We are glad that you have met your requirement and please contact us if you need further assistance.

Live Chat Icon For mobile
Up arrow icon