wpfpropertygridxceed

Change font size for categories in a Xceed PropertyGrid


How do I change the font size of a category header in Xceed's PropertyGrid for WPF?

enter image description here


Solution

  • Set the FontSize property of the control itself and define an implicit TrimmedTextBlock style that sets (preserves) the FontSize of the header:

    <xctk:PropertyGrid ... FontSize="20">
        <xctk:PropertyGrid.Resources>
            <Style TargetType="xctk:TrimmedTextBlock">
                <Setter Property="FontSize" Value="12" />
            </Style>
            ...
        </xctk:PropertyGrid.Resources>
    </xctk:PropertyGrid>