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

SemicircleNorthScale, any way to offset end tick so it doesn't extend outside of control boundaries?

3 Answers 36 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
Rob Ainscough
Top achievements
Rank 1
Rob Ainscough asked on 21 Sep 2016, 09:54 PM

If my RadSemicircleNorthScale has a Min=0 and a Max=100, the 100 text will extended outside of the boundaries of the control making it look a little odd.  Is there any way to bring in the end tick so that the text "100" would stay within the boundaries of the gauge?

Cheers, Rob.

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 26 Sep 2016, 08:49 AM
Hi Rob,

This behavior appears because the label's position is centered to the corresponding tick. In order to offset the last label you can define a LabelTemplate and use an IValueConverter to set a Margin based on the value of the label. You can see this approach demonstrated in the attached project. 

However, keep in mind that re-positioning the label could confuse the end user, because the new position won't be relative to its tick. Instead of re-positioning the label you can also consider hiding it. Or just allocate more space for the scale so that the label's extending outside the boundaries doesn't interfere with the rest of the UI. Another approach which you can try is to disable the labels rotation, thus positioning them horizontally. You can do that by setting the LabelRotationMode property to None.

I hope those suggestions help.

Regards,
Martin
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
 
0
Accepted
Martin Ivanov
Telerik team
answered on 26 Sep 2016, 09:02 AM
Hello Rob,

I sent you a WPF project, please excuse me for that. I am attaching the SL version.

Regards,
Martin
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Rob Ainscough
Top achievements
Rank 1
answered on 26 Sep 2016, 04:21 PM

Thanks Martin, will check out the project.

Cheers, Rob.

Tags
Gauge
Asked by
Rob Ainscough
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Rob Ainscough
Top achievements
Rank 1
Share this question
or