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

Set PropertyGrid's font-family is not working.

4 Answers 84 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Ye HaoChen
Top achievements
Rank 1
Ye HaoChen asked on 16 Jun 2014, 12:53 PM
Hi,

I want to change PropertyGrid font-family, Code like this:

<telerik:RadPropertyGrid Name="squidProperties" Grid.Row="1" RenderMode="Flat"
           AutoGeneratePropertyDefinitions="False"
                        DescriptionPanelVisibility="Collapsed"                        
          FontFamily="Microsoft YaHei" Item="{Binding testtest}" LabelColumnWidth="100"
          Visibility="{Binding test}" />

it's not working.

The textblock's(PART_FieldLabelN) font-family is still Segoe UI.

4 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 18 Jun 2014, 02:14 PM
Hello,

In order to achieve your goal, you need to edit the template of the PropertyGridField. Then you can change the font family of the TextBlock named "PART_FieldLabelN":

<TextBlock
                                    FontFamily="Microsoft YaHei"
                                    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.
 
0
haochen
Top achievements
Rank 1
answered on 30 Mar 2015, 06:09 AM
Hi,

Did you fix this problem in the new version?
0
Yoan
Telerik team
answered on 30 Mar 2015, 09:03 AM
Hi,

Yes. It is working with our latest official version - 2015.1.0225.

Regards,
Yoan
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
haochen
Top achievements
Rank 1
answered on 30 Mar 2015, 09:18 AM
Thank you
Tags
PropertyGrid
Asked by
Ye HaoChen
Top achievements
Rank 1
Answers by
Yoan
Telerik team
haochen
Top achievements
Rank 1
Share this question
or