C# 如何在特性网格中添加嵌套特性
如何在WPF属性网格中添加嵌套属性 我想在样式的子项字体下添加字体属性列表。如何通过嵌套属性获取字体属性列表C# 如何在特性网格中添加嵌套特性,c#,wpf,C#,Wpf,如何在WPF属性网格中添加嵌套属性 我想在样式的子项字体下添加字体属性列表。如何通过嵌套属性获取字体属性列表 Style Font Font Family Font Size Font Style ... and so on.. internal class Properties() { public Properties() { this.FontPropertiesCollection = new List<FontProp
Style
Font
Font Family
Font Size
Font Style ... and so on..
internal class Properties()
{
public Properties()
{
this.FontPropertiesCollection = new List<FontProperties>()
{
????
}
}
[CategoryAttribute("Font")]
[DisplayName("Font")]
public List<FontProperties> FontPropertiesCollection
{
get;
set;
}
}
internal class FontProperties
{
[CategoryAttribute("Font")]
[DisplayNameAttribute("Font Family")]
public string FontFamily
{
get
{
return this.fontFamily;
}
set
{
if (value != this.fontFamily)
{
this.fontFamily= value;
this.OnPropertyChanged("FontFamily");
}
}
}
..... and so on
风格
字体
字体系列
字号
字体样式。。。等等
内部类属性()
{
公共财产()
{
this.FontPropertiesCollection=新列表()
{
????
}
}
[类别属性(“字体”)]
[显示名称(“字体”)]
公共列表FontPropertiesCollection
{
得到;
设置
}
}
内部类属性
{
[类别属性(“字体”)]
[显示名称属性(“字体系列”)]
公共字符串系列
{
得到
{
把这张照片还给我的家人;
}
设置
{
if(值!=此.fontFamily)
{
这个.fontFamily=值;
本协议项下的不动产变更(“FontFamily”);
}
}
}
等等
使用Category属性只能得到一级嵌套
我能看到的创造你想要的东西的唯一方法是
您将需要构建所有的UI
一般来说,我建议不要这样做,因为这不是用户所期望的,当用户按字母顺序对属性进行排序时,这会扰乱用户的思维。哪个WPF属性网格实现?