Style Class |
Namespace: Eto
The Style type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Add<THandler>(String, StyleHandler<THandler>) |
Adds a style for a widget handler
|
![]() ![]() | Add<TWidget>(String, StyleWidgetHandler<TWidget>) |
Adds a style for a widget
|
Name | Description | |
---|---|---|
![]() ![]() | StyleWidget |
Event to handle when a widget has being styled
|
Style.Add<Form>("mainForm", widget => { widget.Title = "Hello!"; });
Style.Add<Eto.Mac.Forms.FormHandler>("mainForm", handler => { handler.Control.CollectionBehavior |= NSWindowCollectionBehavior.FullScreenPrimary; }); Style.Add<Eto.Mac.Forms.ApplicationHandler>("application", handler => { handler.EnableFullScreen (); }); // create the UI (typically this is in your UI library, not in the platform-specific assembly) var app = new Application { Style = "application"; // will apply the style here }; app.Initialized += delegate { app.MainForm = new Form { Style = "mainForm" }; // apply the mainForm style app.MainForm.Show (); };