Class StandAloneCommandBase
Provides a base class from which Addins implementing IStandAloneCommand may derive.
Inheritance
Namespace: Algenta.Colectica.ViewModel.Commands
Assembly: Algenta.Colectica.ViewModel.dll
Syntax
public abstract class StandAloneCommandBase : object, IStandAloneCommand, IGenericCommand
Properties
Category
Gets the category of the command, which is used to group similar commands together. When commands appear in the ribbon, each category gets its own top level ribbon tab.
Declaration
public string Category { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Image
Gets the path to an image that represents the command.
Declaration
public string Image { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Name
Gets the name of the command, which is displayed in menus and on buttons.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Result
Gets the result of the command's execution.
Declaration
public CommandResult Result { get; }
Property Value
Type | Description |
---|---|
CommandResult | The result of the command. |
Implements
SubCategory
Gets the subcategory of the command, which is used to group similar commads together. When commands appear in the ribbon, each subcategory gets its own labeled section of a ribbon tab.
Declaration
public string SubCategory { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Weight
Gets the order in which this Addin should be displayed. Lower values are displayed higher or further to the left.
Declaration
public int Weight { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Implements
Methods
CanExecute()
Determines whether this command should be displayed for the specified node. If this method is not overridden, it will always return true.
Declaration
public virtual bool CanExecute()
Returns
Type | Description |
---|---|
System.Boolean |
|
Implements
Remarks
The value returned from this method determines the Visibility
of the command's menu item or button.
Execute()
Executes the command.
Declaration
public abstract void Execute()