Class EditorSubPanelCommon
A base control for editor sub panels.
Inheritance
Implements
Inherited Members
Namespace: Gorgon.Editor.UI.Controls
Assembly: Gorgon.Editor.API.dll
Syntax
public class EditorSubPanelCommon : EditorBaseControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Remarks
This is a base UI element that allows content plug ins to display a settings/properties panel for a given operation while editing content. Content plug in developers must inherit this type to make their content operation properties/settings visible to the user.
One example of using this would be defining a color for the content. The developer would inherit this control type, and then place a color picker on the control. Then a view model should be created for the control (the view must implement IDataContext<T>), and then the content view model would receive the updated color value when the OK button is clicked by providing an OK command to the panel view model.
Constructors
| Edit this page View SourceEditorSubPanelCommon()
Initializes a new instance of the EditorSubPanelCommon class.
Declaration
public EditorSubPanelCommon()
Fields
| Edit this page View SourcePanelBody
The panel that will hold the body of the sub panel.
Declaration
protected Panel PanelBody
Field Value
Type | Description |
---|---|
Panel |
Properties
| Edit this page View SourceIsModal
Property to set or return whether the panel is modal.
Declaration
[Browsable(true)]
public bool IsModal { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
A modal panel (true) will disable all functionality until it is dismissed, a non-modal panel will allow the application to continue functioning as normal while the panel is open.
Text
Property to set or return the text to display in the caption.
Declaration
[Browsable(true)]
public string Text { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceDispose(bool)
Clean up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true if managed resources should be disposed; otherwise, false. |
Overrides
| Edit this page View SourceOnCancel()
Function to cancel the change.
Declaration
protected virtual void OnCancel()
OnLoad(EventArgs)
Raises the Load event.
Declaration
protected override void OnLoad(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
EventArgs | e | An EventArgs that contains the event data. |
Overrides
| Edit this page View SourceOnSubmit()
Function to submit the change.
Declaration
protected virtual void OnSubmit()
OnValidateOk()
Function called to validate the OK button.
Declaration
protected virtual bool OnValidateOk()
Returns
Type | Description |
---|---|
bool | true if the OK button is valid, false if not. |
OnVisibleChanged(EventArgs)
Raises the VisibleChanged event.
Declaration
protected override void OnVisibleChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
EventArgs | e | An EventArgs object that contains the event data. |
Overrides
| Edit this page View SourceValidateOk()
Function to validate the state of the OK button.
Declaration
protected void ValidateOk()
Events
| Edit this page View SourceCancel
Event triggered when the Cancel button is clicked.
Declaration
public event EventHandler Cancel
Event Type
Type | Description |
---|---|
EventHandler |
Submit
Event triggered when the OK button is clicked.
Declaration
public event EventHandler Submit
Event Type
Type | Description |
---|---|
EventHandler |