Class HostedPanelViewModelBase<T>
A base view model for hosted panels within a ContentBaseControl.
Inheritance
Inherited Members
Namespace: Gorgon.Editor.UI
Assembly: Gorgon.Editor.API.dll
Syntax
public abstract class HostedPanelViewModelBase<T> : ViewModelBase<T, IHostContentServices>, IHostedPanelViewModel, IViewModel, INotifyPropertyChanged, INotifyPropertyChanging where T : HostedPanelViewModelParameters
Type Parameters
Name | Description |
---|---|
T | The type of view model parameters. Must inherit from HostedPanelViewModelParameters. |
Remarks
This view model is used when an operation requires more information from the user. Content plug ins that have functions that have user defined parameters can use this to present those parameters within the same view as the content as pop up panel.
To use a hosted panel the plug in must define the panel by inheriting from this view model, and passing in parameters that inherit from HostedPanelViewModelParameters. A view must be registered with the ContentBaseControl.RegisterChildPanel(string, Control) method.
Constructors
| Edit this page View SourceHostedPanelViewModelBase()
Initializes a new instance of the HostedPanelViewModelBase<T> class.
Declaration
protected HostedPanelViewModelBase()
Properties
| Edit this page View SourceCancelCommand
Property to return the command used to cancel the operation.
Declaration
public IEditorCommand<object> CancelCommand { get; }
Property Value
Type | Description |
---|---|
IEditorCommand<object> |
IsActive
Property to set or return whether the panel is active or not.
Declaration
public bool IsActive { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsModal
Property to return whether the panel is modal.
Declaration
public abstract bool IsModal { get; }
Property Value
Type | Description |
---|---|
bool |
OkCommand
Property to set or return the command used to apply the operation.
Declaration
public IEditorCommand<object> OkCommand { get; set; }
Property Value
Type | Description |
---|---|
IEditorCommand<object> |
Methods
| Edit this page View SourceOnCancel()
Function to allow custom functionality when canceling the operation.
Declaration
protected virtual bool OnCancel()
Returns
Type | Description |
---|---|
bool | true if the cancel operation was handled, or false if not. |