Class ToolWindowToggler
The base command for toggling a layout to be displayed as a tool window in the tool window area that can react to other active layouts
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.ToolWindows
Assembly: ClientCore.dll
Syntax
public abstract class ToolWindowToggler : ViewToggleCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
ToolWindowToggler(IModelLayoutCommon)
Creates a new ToolWindowToggler
Declaration
public ToolWindowToggler(IModelLayoutCommon host)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | host | The main form host context this command operates within |
Properties
DisplayableToolWindowItemType
The ToolWindowItem type this tool window displays
Declaration
protected abstract Type DisplayableToolWindowItemType { get; }
Property Value
Type | Description |
---|---|
System.Type |
OverlayIconID
On some clients another image can be overlayed on the bottom right of the main icon (for indicating add, remove, etc)
This optional overlay image can be specified here, either a ImageType or ImageID
Declaration
public override Guid? OverlayIconID { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
Overrides
SubscribeToLayoutChange
True - Indicates a tool window command will respond to the changes of the active layout as a tool window item typically works against the active layout
Declaration
public override bool SubscribeToLayoutChange { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Methods
CreateDisplayableItem(IModelLayoutDisplayer)
Returns a new instance of the DisplayableToolWindowItemType type for display against the given active layout
Declaration
protected abstract ToolWindowItem CreateDisplayableItem(IModelLayoutDisplayer activeLayout)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutDisplayer | activeLayout | The current active layout for this toolw window to display an item against |
Returns
Type | Description |
---|---|
ToolWindowItem | A new instance of the DisplayableToolWindowItemType type for display against the given active layout |
InternalCanExecute(Object)
By default this tool window command can only be executed if the current active layout is not null
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter | The command parameter |
Returns
Type | Description |
---|---|
System.Boolean | True if the current active layout is not null |
Overrides
InternalExecuteAsync(Object)
Toggles between making the toolwindow visible and hidden
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter | The command parameter |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |
Overrides
OnLayoutsChanged(IModelLayouHost, LayoutChangeEventArgs)
Updates the toggler for this command when the layouts have changed
Declaration
protected override void OnLayoutsChanged(IModelLayouHost sender, LayoutChangeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IModelLayouHost | sender | The main form context that has had layouts change within it |
LayoutChangeEventArgs | e | The type of layout change |