C# 在WPF中加粗显示名称

C# 在WPF中加粗显示名称,c#,wpf,C#,Wpf,我需要在这里用粗体显示显示名称。这是WPF } 字符串fDisplayName; [持久(“显示名称”)] 公共字符串显示名 { 获取{return fDisplayName;} set{SetPropertyValue(“DisplayName”,ref fDisplayName,value);} } 使用AppointmentLabel=DevExpress.Xpf.Scheduler.AppointmentLabel; 使用Resource=DevExpress.XtraSchedule

我需要在这里用粗体显示显示名称。这是WPF

}

字符串fDisplayName;
[持久(“显示名称”)]
公共字符串显示名
{
获取{return fDisplayName;}
set{SetPropertyValue(“DisplayName”,ref fDisplayName,value);}
}
使用AppointmentLabel=DevExpress.Xpf.Scheduler.AppointmentLabel;
使用Resource=DevExpress.XtraScheduler.Resource

您提供的代码片段没有显示任何内容。 持久性与存储有关,与显示无关。
粗体和其他格式选项在实际显示字符串时适用。

ASP.Net与WPF完全相反。在xaml中,使用fontwweight=“BOLD”
string fDisplayName;
[Persistent("DISPLAY_NAME")]
public string DisplayName
{
    get { return fDisplayName; }
    set { SetPropertyValue<string>("DisplayName", ref fDisplayName, value); }
}