Class ControlExtensions
Adds common functionality to Control.
public static class ControlExtensions
- Inheritance
-
ControlExtensions
- Inherited Members
Methods
BringIntoView(Control)
Tries to bring the control into view.
public static void BringIntoView(this Control control)
Parameters
control
ControlThe control.
BringIntoView(Control, Rect)
Tries to bring the control into view.
public static void BringIntoView(this Control control, Rect rect)
Parameters
FindControl<T>(Control, string)
Finds the named control in the scope of the specified control.
public static T? FindControl<T>(this Control control, string name) where T : Control
Parameters
Returns
- T
The control or null if not found.
Type Parameters
T
The type of the control to find.
GetControl<T>(Control, string)
Finds the named control in the scope of the specified control and throws if not found.
public static T GetControl<T>(this Control control, string name) where T : Control
Parameters
Returns
- T
The control.
Type Parameters
T
The type of the control to find.
Set(IPseudoClasses, string, IObservable<bool>)
Sets a pseudoclass depending on an observable trigger.
public static IDisposable Set(this IPseudoClasses classes, string name, IObservable<bool> trigger)
Parameters
classes
IPseudoClassesThe pseudoclasses collection.
name
stringThe name of the pseudoclass to set.
trigger
IObservable<bool>The trigger: true adds the pseudoclass, false removes.
Returns
- IDisposable
A disposable used to cancel the subscription.