Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
xamDataGrid-->TemplateField-->label-->FontWeight-->Bold
posted

hello everyone,

i am using xam data grid in my project, i want to set label's fontwight to bold then what can i do?

<Style TargetType="{x:Type igDp:TemplateField}">

<Setter Property="Label.FontWeight" Value="Bold"/>

</Style>

just i did it but showing me error

'Templated Field'Type must derived from framework element

any suggestion?

  • 16495
    Offline posted

    Hello Aditya,

    The error you are getting is expected, because the TemplateField is not actually a  visual element and it does not derive from FrameworkElement class. You can set the label’s FontWeight  to bold as you create a style for LabelPresenter instead of TemplateField, for example:

    <Style TargetType="{x:Type igDP:LabelPresenter}">
        <Setter Property="FontWeight" Value="Bold"/>
    </Style>

    For additional details you can visit the following topics from our online documentation: Styling XamDataGrid and Changing the Column Headers Style

    Please let me know if you require any further assistance on this matter.

    Sincerely,
    Zhivko
    Entry Level Software Developer