在UserControl中我有一个属性:

public FontWeight RowFontWeight { get { return FontWeights.Bold; } set { } }

我有一个RadGridView名称mygv;在我设置的usercontrol的构造函数中

mygv.DataContext = this;

在gridview我有:

<telerik:RadGridView.RowStyle>
    <Style TargetType="telerik:GridViewRow">
        <Setter Property="FontWeight" Value="{Binding RowFontWeight}" />
     </Style>
</telerik:RadGridView.RowStyle>

但是这些行已经将属性类型更改为字符串,并且它不再起作用 .
显然,如果我写...值= "Bold" ...,没关系 .