如何在 WPF 属性网格中添加嵌套属性。
我想在样式的子字体下添加字体属性列表。如何通过嵌套属性获取字体属性列表?
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