# Platform class

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

```cs
public abstract class Platform
```

Base platform class

**Remarks:** This class takes care of creating the platform-specific implementations of each control. All controls the platform can handle should be added using [Platform.Add<T>(Func<T>)](https://eto.picoe.ca/api/type/eto.platform/add.md).

## Constructors

- [Platform](https://eto.picoe.ca/api/type/eto.platform/ctor.md): Initializes a new instance of the Platform class

## Properties

- [AllowReinitialize](https://eto.picoe.ca/api/type/eto.platform/allowreinitialize.md): (static) Gets or sets a value indicating that the platform should allow reinitialization.
- [Context](https://eto.picoe.ca/api/type/eto.platform/context.md): Gets an object to wrap in the platform's context, when using multiple platforms.
- [Detect](https://eto.picoe.ca/api/type/eto.platform/detect.md): (static) Returns the current generator, or detects the generator to use if no current generator is set.
- [ID](https://eto.picoe.ca/api/type/eto.platform/id.md): Gets the ID of this platform
- [Instance](https://eto.picoe.ca/api/type/eto.platform/instance.md): (static) Gets the platform for the current thread
- [IsAndroid](https://eto.picoe.ca/api/type/eto.platform/isandroid.md): Gets a value indicating whether this platform is based on Xamarin.Android.
- [IsDesktop](https://eto.picoe.ca/api/type/eto.platform/isdesktop.md): Gets a value indicating whether this is a desktop platform. This includes Mac, Gtk, WinForms, Wpf, Direct2D.
- [IsGtk](https://eto.picoe.ca/api/type/eto.platform/isgtk.md): Gets a value indicating whether this platform is based on GTK# (2 or 3)
- [IsIos](https://eto.picoe.ca/api/type/eto.platform/isios.md): Gets a value indicating whether this platform is based on Xamarin.iOS
- [IsMac](https://eto.picoe.ca/api/type/eto.platform/ismac.md): Gets a value indicating whether this platform is a mac based platform (MonoMac/MacOS)
- [IsMobile](https://eto.picoe.ca/api/type/eto.platform/ismobile.md): Gets a value indicating whether this is a mobile platform. This includes iOS, Android, and WinRT.
- [IsValid](https://eto.picoe.ca/api/type/eto.platform/isvalid.md): Gets a value indicating that this platform is valid on the running device
- [IsWinForms](https://eto.picoe.ca/api/type/eto.platform/iswinforms.md): Gets a value indicating whether this platform is based on Windows Forms
- [IsWpf](https://eto.picoe.ca/api/type/eto.platform/iswpf.md): Gets a value indicating whether this platform is based on WPF
- [SupportedFeatures](https://eto.picoe.ca/api/type/eto.platform/supportedfeatures.md): Gets the supported features of the platform.

## Methods

- [Add](https://eto.picoe.ca/api/type/eto.platform/add.md): (2 overloads) Add the specified type and instantiator.
- [Cache<TKey, TValue>](https://eto.picoe.ca/api/type/eto.platform/cache.md): Gets a shared cache dictionary
- [Copy](https://eto.picoe.ca/api/type/eto.platform/copy.md): (static) Creates a copy of the specified `platform`, or the global instance if one is created.
- [Create](https://eto.picoe.ca/api/type/eto.platform/create.md): (2 overloads) Creates a new instance of the handler of the specified type
- [CreateShared](https://eto.picoe.ca/api/type/eto.platform/createshared.md): (2 overloads) Creates a shared singleton instance of the specified type of `type`
- [Find](https://eto.picoe.ca/api/type/eto.platform/find.md): (2 overloads) Find the delegate to create instances of the specified `type`
- [Get](https://eto.picoe.ca/api/type/eto.platform/get.md): (static) Gets the generator of the specified type
- [Initialize](https://eto.picoe.ca/api/type/eto.platform/initialize.md): (2 overloads, static) Initializes the specified `platform` as the current generator, for the current thread
- [Invoke<T>](https://eto.picoe.ca/api/type/eto.platform/invoke.md): (2 overloads) Invoke the specified function within the context of this platform, returning its value.
- [LoadAssembly](https://eto.picoe.ca/api/type/eto.platform/loadassembly.md): (2 overloads) Loads the extensions specified by the assembly attribute [PlatformExtensionAttribute](https://eto.picoe.ca/api/type/eto.platformextensionattribute.md).
- [OnHandlerCreated](https://eto.picoe.ca/api/type/eto.platform/onhandlercreated.md): Handles the [Platform.WidgetCreated](https://eto.picoe.ca/api/type/eto.platform/widgetcreated.md) event
- [OnWidgetCreated](https://eto.picoe.ca/api/type/eto.platform/onwidgetcreated.md): Handles the [Platform.WidgetCreated](https://eto.picoe.ca/api/type/eto.platform/widgetcreated.md) event
- [Supports](https://eto.picoe.ca/api/type/eto.platform/supports.md): (2 overloads) Gets a value indicating that the specified `type` is supported by this platform
- [ThreadStart](https://eto.picoe.ca/api/type/eto.platform/threadstart.md): Used at the start of your custom threads

## Events

- [HandlerCreated](https://eto.picoe.ca/api/type/eto.platform/handlercreated.md): Event to handle when widgets are created by this platform
- [WidgetCreated](https://eto.picoe.ca/api/type/eto.platform/widgetcreated.md): Event to handle when widgets are created by this platform
