Click or drag to resize

WidgetStyle Property

Gets or sets the style of this widget

Namespace:  Eto
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
public string Style { get; set; }

Property Value

Type: String
Styles allow you to attach custom platform-specific logic to a widget. In your platform-specific assembly, use [M:Style.Add{H}(string, StyleHandler{H})] to add the style logic with the same id.
// in your UI
var control = new Button { Style = "mystyle" };

// in your platform assembly
using Eto.Mac.Forms.Controls;

Styles.AddHandler<ButtonHandler>("mystyle", handler => {
    // this is where you can use handler.Control to set properties, handle events, etc.
    handler.Control.BezelStyle = NSBezelStyle.SmallSquare;
See Also