This is a migrated thread and some comments may be shown as answers.

Text indicator

3 Answers 152 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 06 Feb 2018, 03:54 PM

Is there a way to add a text indicator inside a radial gauge?

I have already defined a radial gauge that shows values from 0 to 100 on its radial scale, and the current value in the center of the gauge. I would also like to add a similar gauge that shows text instead numbers in the center. E.g. "Processing", "Calculating", "Complete", ... Human readable status text.

RadialScale.Indicators seems to be a UIElementCollection, so I tried adding a TextBlock object in the collection. However, it is not shown.

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Feb 2018, 01:15 PM
Hello J,

I think the CustomItems collection of the scale will work for you. You can find more about this in the Tick Marks article.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
J
Top achievements
Rank 1
answered on 14 Feb 2018, 12:39 PM

CustomItems did the trick. I also used Viewbox to scale the text during resizing.

One thing I noticed though is that you get a null exception if you put a Viewbox directly inside CustomItems. You need to put the Viewbox inside e.g. a Grid and then the Grid inside CustomItems.

Possible bug so something worth checking out. Stack trace ends in ScaleObject.GetHotSpot method.

0
Martin Ivanov
Telerik team
answered on 16 Feb 2018, 03:53 PM
Hello J,

Can you share some additional information on the exception. For example, you can show me the stack trace. Also, can you prepare some runnable code that demonstrates the error and share it here?

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Gauges
Asked by
J
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
J
Top achievements
Rank 1
Share this question
or