Label with mnemonic at first character rendering problem

3 posts, 0 answers
  1. Lukasz
    Lukasz avatar
    18 posts
    Member since:
    Aug 2014

    Posted 11 Aug Link to this post


    I use 2015 Q2. When I add mnemonic to label this way:

    <telerik:Label Target="{Binding ElementName=InputName}" Grid.Row="0" Content="_Nazwa:"/>
    <telerik:RadMaskedTextInput x:Name="InputName" Grid.Row="0" Grid.Column="1"/>

    my label has additional margin at the beginning (space for non-existent underscore character?). Please see attached file.

    When I remove underscore then label is aligned properly.

    What can I do about it?



  2. Milena
    Milena avatar
    193 posts

    Posted 15 Aug Link to this post

    Hello Lukasz,

    Thank you for the picture and code-snippet provided. 

    I try to reproduce the same behavior locally using binaries from Q2 2015, but to no avail. You can see on the attached picture that our label and MS label are aligned as expected without additional margin. However I might missing some important part of your implementation and this is why I attached the test project I used to reproduce the issue. Please feel free to modify it in order to show us how to reproduce the described behavior.

    Thank you in advance for your cooperation.

    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 R3 2016 release webinar banner
  4. Lukasz
    Lukasz avatar
    18 posts
    Member since:
    Aug 2014

    Posted 29 Aug in reply to Milena Link to this post

    Many thanks for your help. The problem was on my side. I should not alter default style for textblock and add margin to it, because textblock is used as a part of many other controls (including label).
Back to Top