【发布时间】:2015-11-23 16:22:24
【问题描述】:
我创建了具有 ExpandableObjectConverter 类型的基本类,它包含我需要在调用类中显示为可扩展的属性,以便在 propertyGrid 中显示,但它只在属性网格中显示类名,而没有它下面的属性
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class SR1000
{
[Description("Recieve Data Timeout")]
public int Timeout { get; set; }
[Description("Client IP Address")]
[DisplayName("IP Address")]
public string IpAddress { get; set; }
[Description("Command and Data Port")]
public int Port { get; set; }
[Description("Bar Code Reader Postion")]
public Point2D Poistion { get; set; }
}
[Serializable()]
[XmlRoot("BarCodeReader.BarCodeReader")]
public class BarCodeReader : ISystemDevice, IStationSpecificDevice
{
[Category("SR1000")]
public SR1000 SR1000 { get; set; }
}
知道我错过了什么
【问题讨论】:
标签: c# propertygrid typeconverter