WidgetExtensionsWithT Method |
Allows execution of extra code on a widget in a declarative manner.
Namespace:
Eto.Forms
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public static T With<T>(
this T widget,
Action<T> action
)
where T : Widget
<ExtensionAttribute>
Public Shared Function With(Of T As Widget) (
widget As T,
action As Action(Of T)
) As T
[<ExtensionAttribute>]
static member With :
widget : 'T *
action : Action<'T> -> 'T when 'T : Widget
Parameters
- widget
- Type: T
Widget to perform the action on - action
- Type: SystemActionT
Action to execute on the widget before returning
Type Parameters
- T
- Type of the widget
Return Value
Type:
TWidget instance
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also