Interface IAction
Represents a user action, which can be added to a command bar.
Namespace: Sdl.Desktop.IntegrationApi.Extensions.Internal
Assembly: Sdl.Desktop.IntegrationApi.Extensions.dll
Syntax
public interface IAction
Properties
ActionGroup
Returns the action group this action is part of. This property is only valid when the action style (Style property is set to ToggleButton.
Declaration
string ActionGroup { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This property is ignored unless the Style property is set to ToggleButton.
The action group should be a string that is unique across the studio. All ToggleButton style actions that share the same action group act as a group and are rendered as a rdaio button.
When null, the action is shown on the command bar as a checkbox, otherwise it is shown as a radio button.
Available
Returns whether this action is currently available.
Declaration
bool Available { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
If an action is not enabled, it is not shown on the command bar.
Checked
Gets or sets whether this action is checked. This property is only valid when the action style (Style property is set to ToggleButton.
Declaration
bool Checked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DisplayType
Ribbon action size
Declaration
DisplayType DisplayType { get; }
Property Value
Type | Description |
---|---|
DisplayType |
Enabled
Returns whether this action is currently enabled.
Declaration
bool Enabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
If an action is not enabled, it is shown is greyed out on the command bar.
Icon
Returns the icon for this action. Can be null.
Declaration
Icon Icon { get; }
Property Value
Type | Description |
---|---|
System.Drawing.Icon |
Id
Returns the unique id for this action.
Declaration
string Id { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This id is unique across the Studio.
Style
Returns the action style.
Declaration
ActionStyle Style { get; }
Property Value
Type | Description |
---|---|
ActionStyle |
Text
Returns the text for this action.
Declaration
string Text { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Can contain an ampersand to indicate the mnemonic character.
ToolTipText
Returns the tooltip test for this action.
Declaration
string ToolTipText { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Execute()
Called when the user activates this action.
Declaration
bool Execute()
Returns
Type | Description |
---|---|
System.Boolean |
Initialize()
Called when the action is initialized.
Declaration
void Initialize()
Events
PropertyChanged
Raised when the value of one of the action's properties changed.
Declaration
event EventHandler<ActionPropertyChangedEventArgs> PropertyChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ActionPropertyChangedEventArgs> |
Remarks
For possible property values, see the constants defined in ActionProperties.