# Widget class

Namespace: [Eto](https://eto.picoe.ca/api/namespace/eto.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
[RuntimeNameProperty("ID")]
public abstract class Widget : IHandlerSource, IDisposable, ICallbackSource
```

Base widget class for all objects requiring a platform-specific implementation

**Remarks:** The Widget is the base of all abstracted objects that have platform-specific implementations. To implement the handler for a widget, use the [WidgetHandler<TWidget>](https://eto.picoe.ca/api/type/eto.widgethandler-1.md) as the base class.

**Derived types:** [Application](https://eto.picoe.ca/api/type/eto.forms.application.md), [BindableWidget](https://eto.picoe.ca/api/type/eto.forms.bindablewidget.md), [Cell](https://eto.picoe.ca/api/type/eto.forms.cell.md), [Clipboard](https://eto.picoe.ca/api/type/eto.forms.clipboard.md), [CommonDialog](https://eto.picoe.ca/api/type/eto.forms.commondialog.md), [Cursor](https://eto.picoe.ca/api/type/eto.forms.cursor.md), [DataObject](https://eto.picoe.ca/api/type/eto.forms.dataobject.md), [Font](https://eto.picoe.ca/api/type/eto.drawing.font.md), [FontFamily](https://eto.picoe.ca/api/type/eto.drawing.fontfamily.md), [FontTypeface](https://eto.picoe.ca/api/type/eto.drawing.fonttypeface.md), [FormattedText](https://eto.picoe.ca/api/type/eto.drawing.formattedtext.md), [Gesture](https://eto.picoe.ca/api/type/eto.forms.gesture.md), [Graphics](https://eto.picoe.ca/api/type/eto.drawing.graphics.md), [GridColumn](https://eto.picoe.ca/api/type/eto.forms.gridcolumn.md), [Image](https://eto.picoe.ca/api/type/eto.drawing.image.md), [Notification](https://eto.picoe.ca/api/type/eto.forms.notification.md), [PageSettings](https://eto.picoe.ca/api/type/eto.forms.pagesettings.md), [PrintDocument](https://eto.picoe.ca/api/type/eto.forms.printdocument.md), [PrintSettings](https://eto.picoe.ca/api/type/eto.forms.printsettings.md), [Region](https://eto.picoe.ca/api/type/eto.drawing.region.md), [Screen](https://eto.picoe.ca/api/type/eto.forms.screen.md), [Theme](https://eto.picoe.ca/api/type/eto.forms.theme.md), [Thread](https://eto.picoe.ca/api/type/eto.threading.thread.md), [TrayIndicator](https://eto.picoe.ca/api/type/eto.forms.trayindicator.md), [UITimer](https://eto.picoe.ca/api/type/eto.forms.uitimer.md)

## Constructors

- [Widget](https://eto.picoe.ca/api/type/eto.widget/ctor.md): (2 overloads) Initializes a new instance of the Widget class

## Properties

- [ControlObject](https://eto.picoe.ca/api/type/eto.widget/controlobject.md): Gets the instance of the platform-specific object
- [ICallbackSource.Callback](https://eto.picoe.ca/api/type/eto.widget/eto-icallbacksource-callback.md)
- [Handler](https://eto.picoe.ca/api/type/eto.widget/handler.md): Gets the platform-specific handler for this widget
- [ID](https://eto.picoe.ca/api/type/eto.widget/id.md): Gets or sets the ID of this widget
- [IsDisposed](https://eto.picoe.ca/api/type/eto.widget/isdisposed.md): Gets or sets a value indicating whether this `Widget` has been disposed.
- [NativeHandle](https://eto.picoe.ca/api/type/eto.widget/nativehandle.md): Gets the native platform-specific handle for integration purposes
- [Platform](https://eto.picoe.ca/api/type/eto.widget/platform.md): Gets the platform that was used to create the [Widget.Handler](https://eto.picoe.ca/api/type/eto.widget/handler.md) for this widget
- [Properties](https://eto.picoe.ca/api/type/eto.widget/properties.md): Gets the dictionary of properties for this widget
- [Style](https://eto.picoe.ca/api/type/eto.widget/style.md): Gets or sets the style of this widget

## Methods

- [Dispose](https://eto.picoe.ca/api/type/eto.widget/dispose.md): (2 overloads) Disposes of this widget, supressing the finalizer
- [GetCallback](https://eto.picoe.ca/api/type/eto.widget/getcallback.md): Gets an instance of an object used to perform callbacks to the widget from handler implementations
- [Initialize](https://eto.picoe.ca/api/type/eto.widget/initialize.md): Initializes the widget handler
- [OnStyleChanged](https://eto.picoe.ca/api/type/eto.widget/onstylechanged.md): Handles when the [Widget.Style](https://eto.picoe.ca/api/type/eto.widget/style.md) is changed.
- [RegisterEvent<T>](https://eto.picoe.ca/api/type/eto.widget/registerevent.md): (static) Registers the event for overridding
- [ToString](https://eto.picoe.ca/api/type/eto.widget/tostring.md): Gets a string that represents the current object with its ID if specified.

## Events

- [StyleChanged](https://eto.picoe.ca/api/type/eto.widget/stylechanged.md): Occurs when the [Widget.Style](https://eto.picoe.ca/api/type/eto.widget/style.md) property has changed
