# ExportInitializerAttribute class

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

```cs
[AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = true)]
public sealed class ExportInitializerAttribute : PlatformExtensionAttribute
```

Attribute to apply to 3rd party assemblies to load additional controls or functionality.

**Remarks:** This can be used by both by the cross platform control library, and in each of the platform-specific libraries.

**Example:**

For example, say you want to create a new control, called

```cs
MyControl
```

, you would have a shared assembly, plus implementation assemblies for each platform. MyControls.dll:

```cs
using Eto;
using Eto.Forms;

namespace MyControls
{
	[Handler(typeof(IHandler))]
	public class MyControl : Control
	{
		new IHandler Handler => base.Handler as IHandler;

		public bool SomeProperty
		{
			get { return Handler.SomeProperty; }
			set { Handler.SomeProperty = value; }
		}

		public new interface IHandler : IHandler
		{
			bool SomeProperty { get; set; }
		}
	}
}
```

 MyControls.Wpf.dll:

```cs
using Eto;
using Eto.Forms;
using Eto.Wpf.Forms;

[assembly:ExportInitializer(typeof(MyControls.Wpf.MyPlatform))]

namespace MyControls.Wpf
{
	class MyPlatform : IPlatformExtension
	{
		public Initialize(Platform platform)
		{
			platform.Add<MyControl.IHandler>(() => new MyControlHandler());
		}
	}

	public class MyControlHandler : WpfFrameworkElement<SomeWpfControl, MyControl, MyControl.ICallback>, MyControl.IHandler
	{
		public MyControlHandler()
		{
			Control = new SomeWpfControl();
		}

		// TODO:
		public bool SomeProperty
		{
			get { return false; }
			set { }
		}
	}
}
```

## Constructors

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

## Properties

- [InitializerType](https://eto.picoe.ca/api/type/eto.exportinitializerattribute/initializertype.md): Type of the extension class to instantiate when the assembly this attribute is supplied on is loaded by the platform.

## Methods

- [Register](https://eto.picoe.ca/api/type/eto.exportinitializerattribute/register.md): Registers the extension with the specified platform

## Inherited Members

- From [PlatformExtensionAttribute](https://eto.picoe.ca/api/type/eto.platformextensionattribute.md): [PlatformID](https://eto.picoe.ca/api/type/eto.platformextensionattribute/platformid.md), [Supports](https://eto.picoe.ca/api/type/eto.platformextensionattribute/supports.md)
