C# Class Fizzler.Systems.WinForms.ControlExtensions

Extension methods for Control.
Show file Open project: atifaziz/Fizzler

Public Methods

Method Description
ControlsAfterSelf ( this control ) : IEnumerable

Returns a collection of all controls that precede this control in children of its parent.

ControlsBeforeSelf ( this control ) : IEnumerable

Returns a collection of all controls that succeed this control in children of its parent.

Descendants ( this control ) : IEnumerable

Returns a collection of all controls that are the children and grandchildren of this control.

FindPropertyValue ( this control, string name ) : object

Attemps to locate a property on the object and returns its value. If the property does not exist then a null reference is returned.

FindPropertyValue ( this control, string name, object defaultValue ) : object

Attemps to locate a property on the object and returns its value. If the property does not exist then the value specified in defaultValue is returned instead.

Properties ( this control ) : PropertyDescriptorCollection

Returns a collection of all properties on the control.

Private Methods

Method Description
DescendantsImpl ( Control control ) : IEnumerable
FindPropertyValueString ( this control, string name ) : string

Attemps to locate a property on the object and returns a string representation of its value. If the property does not exist then an empty string is returned but never a null reference.

Method Details

ControlsAfterSelf() public static method

Returns a collection of all controls that precede this control in children of its parent.
public static ControlsAfterSelf ( this control ) : IEnumerable
control this
return IEnumerable

ControlsBeforeSelf() public static method

Returns a collection of all controls that succeed this control in children of its parent.
public static ControlsBeforeSelf ( this control ) : IEnumerable
control this
return IEnumerable

Descendants() public static method

Returns a collection of all controls that are the children and grandchildren of this control.
public static Descendants ( this control ) : IEnumerable
control this
return IEnumerable

FindPropertyValue() public static method

Attemps to locate a property on the object and returns its value. If the property does not exist then a null reference is returned.
public static FindPropertyValue ( this control, string name ) : object
control this
name string
return object

FindPropertyValue() public static method

Attemps to locate a property on the object and returns its value. If the property does not exist then the value specified in defaultValue is returned instead.
public static FindPropertyValue ( this control, string name, object defaultValue ) : object
control this
name string
defaultValue object
return object

Properties() public static method

Returns a collection of all properties on the control.
public static Properties ( this control ) : PropertyDescriptorCollection
control this
return System.ComponentModel.PropertyDescriptorCollection