This is a migrated thread and some comments may be shown as answers.

Customizing PropertyGridField

2 Answers 104 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Amige
Top achievements
Rank 1
Veteran
Amige asked on 16 Mar 2015, 06:35 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 17 Mar 2015, 11:47 AM
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.

 
0
Amige
Top achievements
Rank 1
Veteran
answered on 19 Mar 2015, 06:34 PM
Hello Vanya,

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

Regards,

Alberto
Tags
PropertyGrid
Asked by
Amige
Top achievements
Rank 1
Veteran
Answers by
Vanya Pavlova
Telerik team
Amige
Top achievements
Rank 1
Veteran
Share this question
or