Click or drag to resize

StyleAddTWidget Method (String, StyleWidgetHandlerTWidget)

Adds a style for a widget

Namespace:  Eto
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public static void Add<TWidget>(
	string style,
	StyleWidgetHandler<TWidget> handler
)
where TWidget : Widget

Parameters

style
Type: SystemString
Identifier of the style
handler
Type: EtoStyleWidgetHandlerTWidget
Delegate with your logic to style the widget

Type Parameters

TWidget
Type of the widget to style
Remarks
Styling a widget allows you to access the widget, but not the platform-specific controls (in a type-safe way). Typically, you'd use Style.Add<H>(string, StyleHandler<H>) instead, which will add a style based on the widget handler, which will give you direct and type safe access to platform-specifics of the widget.
See Also