
# IOptionsPage interface

The `IOptionsPage` interface represents the page of controls in the system wide Preferences dialog. For example, in Altium Designer, the controls on this page in the Preferences dialog are mapped from the controls on a server panel of this server. The controls on a page is represented by the TOptionsForm object and its `IOptionsPage` interface.

```csharp
public interface IOptionsPage
```

**Namespace:** DXP · **Assembly:** Altium.SDK.Interfaces

## Remarks

The server module (TServerModule class) has the RegisterOptionsPageClass method which takes in the TOptionsForm object. The `IOptionsPage` interface represents this TOptionsForm object.

The TOptionsForm class has methods that you need to override to implement the [`OptionsPage`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/OptionsPage.md), OptionsManager, OptionsReader and OptionsWriter interfaces.

ClearModified

[`GetModified`](#modified)

[`GetStateControls`](#getstatecontrols)

[`GetNotificationCode`](#getnotificationcode)

DoSetStateControls

[`SetDefaultState`](#setdefaultstate)

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [Modified](#modified) | `bool` | get; set |  |

### Modified

*No description yet.*

```csharp
bool GetModified();
void SetModified(bool argValue);
```

**Type:** `bool` · **Access:** read/write

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [GetNotificationCode](#getnotificationcode) | `int` | Each server that handles Option notifications to its server panel and the system wide Preferences dialog in Altium Designer will have its own Notification code which could be a value of 100 upwards. |
| [GetStateControls](#getstatecontrols) | `void` | This method |
| [OptionsFormDataManager](#optionsformdatamanager) | [IOptionsFormDataManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/IOptionsFormDataManager.md) |  |
| [PostEditControls](#posteditcontrols) | `void` |  |
| [SetDefaultState](#setdefaultstate) | `void` | This method sets the controls on a page within the system wide Preferences dialog to their default values. |
| [SetStateControls](#setstatecontrols) | `void` | This method updates the controls on the form from a data structure in a server module. |
| [TryApplyFormOptions](#tryapplyformoptions) | `bool` |  |

### GetNotificationCode

Each server that handles Option notifications to its server panel and the system wide Preferences dialog in Altium Designer will have its own Notification code which could be a value of 100 upwards.

```csharp
int GetNotificationCode();
```

**Returns:** `int`

A server module will have a TOptionsForm object registered and this object will have a `GetNotificationCode` method overridden. This server module will have its own notification code value. Ensure these notification codes are unique.

### GetStateControls

This method

```csharp
void GetStateControls();
```

**Returns:** nothing (`void`)

### OptionsFormDataManager

*No description yet.*

```csharp
IOptionsFormDataManager OptionsFormDataManager();
```

**Returns:** [IOptionsFormDataManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/IOptionsFormDataManager.md)

Extension method of `IOptionsPageHelper` (`using DXP;`).

### PostEditControls

*No description yet.*

```csharp
void PostEditControls();
```

**Returns:** nothing (`void`)

### SetDefaultState

This method sets the controls on a page within the system wide Preferences dialog to their default values.

```csharp
void SetDefaultState();
```

**Returns:** nothing (`void`)

The `SetDefaultState` method is overridden in a server's TOptionsForm object.

### SetStateControls

This method updates the controls on the form from a data structure in a server module.

```csharp
void SetStateControls();
```

**Returns:** nothing (`void`)

### TryApplyFormOptions

*No description yet.*

```csharp
bool TryApplyFormOptions();
```

**Returns:** `bool`

## Returned by

[IServerOptions.CreateOptionsPageByName](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/IServerOptions.md#createoptionspagebyname), [IVcsProvider.GetOptionPage](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/IVcsProvider.md#getoptionpage), [IPartProvider.GetOptionsPage](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IPartProvider.md#getoptionspage), [ISupplier.GetOptionsPage](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISupplier.md#getoptionspage)

## Examples

Used in the SDK examples: [Ciiva](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Ciiva/Source%20Code/Main.cs#L64), [Extension_Preference](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_Preference/Source%20Code/Main.cs#L62).
