Click or drag to resize

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

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: T
Widget 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