Customizing PropertyGridField

3 posts, 1 answers
  1. Amige
    Amige avatar
    44 posts
    Member since:
    Dec 2013

    Posted 16 Mar 2015 Link to this post

    Hello,

    I am using a PropertyGrid control but I need it to be very small, I set its FontSize property to 9 and I tried to change the Height property of the PropertyGridField by using a style:

    <Style TargetType="telerik:PropertyGridField">
        Setter Property="Height" Value="18" />
    </Style>

    When I do that, the controls within the PropertyGridField don't adjust and they look kind of odd. I am attaching an image showing the result.

    Is there a way to accomplish what I am trying to do?

    Thanks in advance,

    Alberto
  2. Answer
    Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 17 Mar 2015 Link to this post

    Hello Amige,


    All editors have MinHeight property, which is set to 22 pixels. Since you are trying to altert the height of property grid field, you should alter the editors too. Please refer to the following XAML mark-up:

    <Style TargetType="TextBox" BasedOn="{StaticResource TextBoxStyle}">
        <Setter Property="MinHeight" Value="12"/>
        <Setter Property="Height" Value="12"/>
        <Setter Property="FontSize" Value="9"/>
        <Setter Property="Padding" Value="3,0"/>
    </Style>

    Hope this helps. 


    Regards,
    Vanya Pavlova
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Amige
    Amige avatar
    44 posts
    Member since:
    Dec 2013

    Posted 19 Mar 2015 in reply to Vanya Pavlova Link to this post

    Hello Vanya,

    Thanks a lot for the help, that's what I was looking for.

    Regards,

    Alberto
Back to Top