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

Change FontSize of property name in RadPropertyGrid

1 Answer 99 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Ilya
Top achievements
Rank 1
Ilya asked on 11 Jun 2014, 11:23 AM
Hello.

How can I change size of font of names of properties in RadPropertyGrid? I have AutoGeneratePropertyDefinitions="True", so everything generates automatic. Furthermore I would like to do it in xaml file if it is possible. 

I have just tried to set FontSize for the RadPropertyGrid and it didn't work. Moreover I think there is different sizes for different text fields in RadPropertyGrid.

I have attached a picture of what I am talking about.

Thank you for help,
Ilya.

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 12 Jun 2014, 09:15 AM
Hi Ilya,

In order to achieve your goal, you need to edit the template of the PropertyGridField. Then you can change the font size of the TextBlock named "PART_FieldLabelN":
<TextBlock
                                    FontFamily="Calibri"
                                    IsHitTestVisible="True"
                                    FontWeight="Normal"
                                    FontSize="13"
                                    Foreground="{telerik:Office2013Resource ResourceKey=InvertedBrush}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Margin="9,2,0,2"
                                    Text="{Binding DisplayName}"
                                    x:Name="PART_FieldLabelN"/>

For your convenience, I have attached a sample project that demonstrates the approach.

I hope it helps.

Regards,
Yoan
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.
 
Tags
PropertyGrid
Asked by
Ilya
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or