Show / Hide Table of Contents

Class StandAloneCommandBase

Provides a base class from which Addins implementing IStandAloneCommand may derive.

Inheritance
System.Object
StandAloneCommandBase
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
IGenericCommand.Category

Image

Gets the path to an image that represents the command.

Declaration
public string Image { get; set; }
Property Value
Type Description
System.String
Implements
IGenericCommand.Image

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
IGenericCommand.Name

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
IStandAloneCommand.Result

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
IGenericCommand.SubCategory

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
IGenericCommand.Weight

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

true if the command should be displayed for the specified node; otherwise false.

Implements
IStandAloneCommand.CanExecute()
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()
Implements
IStandAloneCommand.Execute()

Extension Methods

Extensions.Yield<T>(T)
Back to top Copyright © 2009-2018 Colectica