Interface ISettingsPage
Represents a settings page, which is displayed in the settings dialog.
Inherited Members
Namespace: Sdl.Core.Settings
Assembly: Sdl.Core.Settings.dll
Syntax
public interface ISettingsPage : IDisposable
Remarks
You can add a new settings page, by extending the AbstractSettingsPage class.
Properties
DataSource
The object which the settings page will manipulate the values upon. This is typically an ISettingsBundle.
Declaration
object DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
HasDefaultSettings
Called to determine whether the settings page supports the ResetToDefaults() method.
Declaration
bool HasDefaultSettings { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Determines whether a 'Reset To Default' button should be displayed/enabled in the host application.
Methods
AfterCancel()
Called after all settings pages shown on the settings dialog have been canceled.
Declaration
void AfterCancel()
AfterSave()
Called after all settings pages shown on the settings dialog have been saved.
Declaration
void AfterSave()
Cancel()
Called when the settings dialog is canceled.
Declaration
void Cancel()
GetControl()
Called by the framework to retrieve the control that displays the user interface for the settings page.
Declaration
object GetControl()
Returns
Type | Description |
---|---|
System.Object |
Remarks
The implementation should initialize the control from the settings.
OnActivate()
Called when this settings page is activated.
Declaration
void OnActivate()
OnDeactivate()
Called when this settings page is deactivated.
Declaration
void OnDeactivate()
ResetToDefaults()
Called to reset settings to default values. The implementation is responsible for resetting the settings and updating the user interface accordingly.
Declaration
void ResetToDefaults()
Remarks
This method should not save the settings yet. This should be done in Save().
This method will not be called if HasDefaultSettings returns false
.
Save()
Called when settings should be saved. The implementation is responsible for persisting the settings.
Declaration
void Save()
Remarks
This method is called once, after ValidateInput() has been called.
ValidateInput()
Returns true if the input on this settings page is valid.
Declaration
bool ValidateInput()
Returns
Type | Description |
---|---|
System.Boolean | True if the input on this settings page is valid. |
Remarks
This method is called when navigating away from a page and before Save() is called.