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

4 posts, 1 answers
  1. Rob Ainscough
    Rob Ainscough avatar
    172 posts
    Member since:
    Jan 2010

    Posted 21 Sep Link to this post

    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.

  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 26 Sep Link to this post

    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.
     
  3. DevCraft banner
  4. Answer
    Martin
    Admin
    Martin avatar
    1101 posts

    Posted 26 Sep Link to this post

    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.
  5. Rob Ainscough
    Rob Ainscough avatar
    172 posts
    Member since:
    Jan 2010

    Posted 26 Sep in reply to Martin Link to this post

    Thanks Martin, will check out the project.

    Cheers, Rob.

Back to Top