System.ComponentModel
The System.ComponentModel namespace provides classes that are used to implement the run-time and design-time behavior of components and controls.
This namespace includes the base classes and interfaces for implementing attributes and type converters, binding to data sources, and licensing components.
System.ComponentModel.PropertyDescriptor
System.ComponentModel.RunWorkerCompletedEventArgs
System.ComponentModel.IBindingList
System.ComponentModel.IBindingListView
System.ComponentModel.ICancelAddNew
System.ComponentModel.IListSource
System.ComponentModel.IEditableObject
System.ComponentModel.ITypedList
[Browsable] attribute
System.ComponentModel.BrowsableAttribute
[Browsable(false)]
public class MyClass
This can be applied to properties or events.
Used to specify that a property or event should be displayed in a Properties window and can be modified at design time.
[DefaultValue] attribute
System.ComponentModel.DefaultValueAttribute
[DefaultValue(false)]
public bool MyProperty
This can be applied to
Used to specify a default value for a property.
[DesignerSerializationVisibility] attribute
System.ComponentModel.DesignerSerializationVisibilityAttribute
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public bool MyProperty
This can be applied to
Specifies the visibility a property has to the design-time serializer
There are three choice:
DesignerSerializationVisibility.Content = code is produced for the contents rather than the object
DesignerSerializationVisibility.Hidden = code is not produced for the object
DesignerSerializationVisibility.Visible = Code is produced for the object
[DesignTimeVisible] attribute
System.ComponentModel.DesignTimeVisibleAttribute
[DesignTimeVisible(true)]
public class MyClass
This can be applied to classes
Used to explicitly prevent a component from appearing on a visual designer.
[EditorBrowsable] attribute
System.ComponentModel.EditorBrowsableAttribute
[EditorBrowsable(EditorBrowsableState.Never)]
public bool MyProperty
This can be applied to properties and methods.
Specifies that a property or method is viewable in a visual designer or text editor.
There are three choices:
EditorBrowsableState.Advanced - An editor can either show or hide
EditorBrowsableState.Always - Always browsable from within an editor
EditorBrowsableState.Never - Not browsable from within an editor
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext