Displaying '&' character in button element?

2 posts, 0 answers
  1. Michael
    Michael avatar
    2 posts
    Member since:
    Apr 2009

    Posted 30 Apr 2009 Link to this post

    I'm attempting to create a button that says "Save & New".  However, using the normal chord for this "&&" changes the display on the button to "Save & .....".  Using just an single '&' does the normal mnemonic thing of underlining the next character. 

    Note: the "..." is not because I've run out of room.  if I write "Save And New", it shows up just fine.
  2. Peter
    Peter avatar
    1160 posts

    Posted 01 May 2009 Link to this post

    Hi Michael,

    There is an issue with the text measure when you are trying to escape ampersand character.
    This will be fixed in our next version. You could avoid this behavior by setting UseMnemonic property of TextPrimitive to false:

    ((TextPrimitive)buttonElementInRibbon1.Children[1].Children[1]).UseMnemonic = false

    Don't hesitate to contact us if you have other questions.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top