Windows 7 Theme + Textbox

2 posts, 0 answers
  1. Andrea
    Andrea avatar
    16 posts
    Member since:
    Jul 2012

    Posted 02 May 2014 Link to this post

    Hi,

    I've recently updated from 2013.2.0661.1050 to 2014.1.0224.1050 and I've noticed an odd quirk with a textbox. The cursor now always starts half way down the textbox. Looks like there is some padding going on? It only appears to be happening with textboxes with the height, textwrapping and accepts return properties set. I've narrowed this down to a style and I can trigger this behavior on and off by removing the reference to the Windows 7 theme. Any idea?

    Style:

    <telerik:Windows7Theme
           x:Key="Theme" />

        <Style
           x:Key="FormTextBoxBaseStyle"
           TargetType="TextBox"
           telerik:StyleManager.BasedOn="{StaticResource Theme}">
            <!--  NB: Telerik default Windows7 style sets this to 5,2 for SL and 3,2 for WPF in 2012 Q2 SP1. -->
            <Setter
               Property="Padding"
               Value="3, 2" />
            <Setter
               Property="VerticalAlignment"
               Value="Center" />
        </Style>

    See attached files for the bug. Part highlighted in yellow can never contain text.

    Any idea if there were changes to the Windows 7 theme recently that might have caused this?

    Thanks,
    Andrea
  2. Vera
    Admin
    Vera avatar
    263 posts

    Posted 02 May 2014 Link to this post

    Hello Andrea,

    Actually, this is the expected behavior after we eliminated some inconsistencies among our controls. You can easily avoid it by setting TextBox.VerticalContentAlignment property to Top.  

    Please excuse us for the inconvenience caused.

    Regards,
    Vera
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
Back to Top