Label with mnemonic at first character rendering problem

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

    Posted 11 Aug 2016 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
    228 posts

    Posted 15 Aug 2016 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. Lukasz
    Lukasz avatar
    28 posts
    Member since:
    Aug 2014

    Posted 29 Aug 2016 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