You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Re-template RadialGauge to remove ViewBox (was: Setting RadialGauge Height and Width scales the text (Value and Unit)) #2246
Given the nature of the control, I don't think it'd be possible to keep the text of the value and unit at the configured text size. Maybe changing the design so that both the value and the unit are outside of the gauge, we could make them respect the text size regardless of the gauge scaling.
Does this image reproduce the issue correctly?
BTW, I couldn't get VS to recognize the header property, even with the packages from the 3.0.0 version. How did you use it?
@Bmartin2013 Yes, the image is representative. The issue I have using the control as it is, is that 200x200 is too big for us and when I reduce the size to 150x150 the number becomes small, and does not go well with other controls.
Given the nature of the control, I don't think it'd be possible to keep the text of the value and unit at the configured text size.
Maybe, putting the text in the center and bringing it out of the ViewBox could help (up too an extent).
About Header, it was typo on my part. I am deriving another control to add header to the control. As you would have noticed most of the basic controls, from ComboBox to TextBox, has Header. I think adding a Header to control would also make sense if you have couple of gauges, header could help put a context to them, especially if the unit is same.
After looking into it, I think that changing the text layout could be a breaking change. Instead, we could add a property to the control in order to hide the default text, giving you the freedom to handle the text layout anyway you want. What do you think?
This control needs to be rewritten IMO, the entire layout depends on a single ViewBox that is causing these issues and needs to be removed. It's a breaking change, but I think it's for the better. Let's keep this issue open for tracking. Opening up to the community.
(P.S. In the meantime, you could re-template the control in your app directly and remove any properties not needed)
changed the title [-]Setting RadialGauge Height and Width scales the text (Value and Unit)[/-][+]Re-template RadialGauge to remove ViewBox (was: Setting RadialGauge Height and Width scales the text (Value and Unit))[/+]on Jun 18, 2018
In the meantime, you could re-template the control in your app directly and remove any properties not needed
This is precisely I am trying to do. I am taking above as requirements and working on it. One thing that I don't understand is the UI automation. See this related question on stack.
Whilst there is a consideration for re-thinking this Radial Gauge control, perhaps there should be some thought to having a default design which fits with the Microsoft Design Language, and Fluent design principles.
I'm definitely in favor of a more fluent default look and feel. After all, the current version was specifically designed for Windows 8.
As far as templating concerns: it's easy to pull the text boxes out of the view box and override their font size (just did it: it still looks sharp at a size of 80). We could do this change in the toolkit, and add two more properties to the control: ValueFontSize and UnitFontSize.
Initializing default colors from theme resources (including high contrast) is also something we could do. All default colors are hard-coded now.
Activity
Bmartin2013 commentedon Jun 15, 2018
Given the nature of the control, I don't think it'd be possible to keep the text of the value and unit at the configured text size. Maybe changing the design so that both the value and the unit are outside of the gauge, we could make them respect the text size regardless of the gauge scaling.
Does this image reproduce the issue correctly?
BTW, I couldn't get VS to recognize the header property, even with the packages from the 3.0.0 version. How did you use it?
harvinders commentedon Jun 16, 2018
@Bmartin2013 Yes, the image is representative. The issue I have using the control as it is, is that 200x200 is too big for us and when I reduce the size to 150x150 the number becomes small, and does not go well with other controls.
Maybe, putting the text in the center and bringing it out of the
ViewBoxcould help (up too an extent).About
Header, it was typo on my part. I am deriving another control to add header to the control. As you would have noticed most of the basic controls, fromComboBoxtoTextBox, hasHeader. I think adding aHeaderto control would also make sense if you have couple of gauges, header could help put a context to them, especially if the unit is same.Bmartin2013 commentedon Jun 18, 2018
After looking into it, I think that changing the text layout could be a breaking change. Instead, we could add a property to the control in order to hide the default text, giving you the freedom to handle the text layout anyway you want. What do you think?
nmetulev commentedon Jun 18, 2018
This control needs to be rewritten IMO, the entire layout depends on a single ViewBox that is causing these issues and needs to be removed. It's a breaking change, but I think it's for the better. Let's keep this issue open for tracking. Opening up to the community.
(P.S. In the meantime, you could re-template the control in your app directly and remove any properties not needed)
[-]Setting RadialGauge Height and Width scales the text (Value and Unit)[/-][+]Re-template RadialGauge to remove ViewBox (was: Setting RadialGauge Height and Width scales the text (Value and Unit))[/+]avknaidu commentedon Jun 19, 2018
If this needs to be rewriten, @JerryNixon 's Speedometer Sample should be a good start
harvinders commentedon Jun 19, 2018
@Bmartin2013 @nmetulev @avknaidu
While we are at refactoring/rewriting I think following should be consider .
ThemeResource@nmetulev
This is precisely I am trying to do. I am taking above as requirements and working on it. One thing that I don't understand is the UI automation. See this related question on stack.
mdtauk commentedon Jun 19, 2018
Whilst there is a consideration for re-thinking this Radial Gauge control, perhaps there should be some thought to having a default design which fits with the Microsoft Design Language, and Fluent design principles.
Bmartin2013 commentedon Jun 19, 2018
If we are going to redesign this control we should keep in mind high contrast accessibility, as currently, the control has issues with it.
XamlBrewer commentedon Jun 19, 2018
I'm definitely in favor of a more fluent default look and feel. After all, the current version was specifically designed for Windows 8.
As far as templating concerns: it's easy to pull the text boxes out of the view box and override their font size (just did it: it still looks sharp at a size of 80). We could do this change in the toolkit, and add two more properties to the control: ValueFontSize and UnitFontSize.
Initializing default colors from theme resources (including high contrast) is also something we could do. All default colors are hard-coded now.
gbarcho commentedon Jun 27, 2018
Whats the current status?
Kyaa-dost commentedon Apr 2, 2021
Transferring this to the discussion as it requires more clarity.