.NET 大內高手專欄 善用.NET的PropertyGrid控件 文/蔡學鏞 -----box----- #程式1 [Category("Color")] [Description ("This is foreground color")] public string Foreground { get { … } set { … } } -----end----- -----box----- #程式2 [Category("Color")] [Description ("This is background color")] public string Background { get { … } set { … } } -----end----- -----程式----- #程式3 [Browsable (false)] public Rectangle Rect { get { … } set { … } } -----end----- -----box----- #程式4 propertyGrid1.BrowsableAttributes = new AttributeCollection( new Attribute[] {new A1Attribute(), new A2Attribute(true) } ); -----end-----