Search Results for

    Show / Hide Table of Contents

    Class AbstractAction

    Abstract base class for user actions, which can be added to a command bar.

    Inheritance
    System.Object
    AbstractAction
    AbstractViewControllerAction<TController>
    AbstractBindedAction
    Implements
    IAction
    IExtensionAware
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.Desktop.IntegrationApi
    Assembly: Sdl.Desktop.IntegrationApi.dll
    Syntax
    public abstract class AbstractAction : IAction, IExtensionAware

    Constructors

    AbstractAction()

    Declaration
    protected AbstractAction()

    Properties

    ActionAttribute

    Gets the action attribute.

    Declaration
    public ActionAttribute ActionAttribute { get; }
    Property Value
    Type Description
    ActionAttribute

    The action attribute.

    ActionGroup

    Gets or sets the action group this action is part of. This property is only valid when the action style (Style property is set to ToggleButton.

    Declaration
    public string ActionGroup { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    When null, the action is shown on the command bar as a checkbox, otherwise it is shown as a radio button.

    Available

    Gets or sets whether this action is currently available.

    Declaration
    public bool Available { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    If an action is not available, 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
    public bool Checked { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Setting this property to true when the action has been added to a command bar will result in the Execute() method being called.

    DisplayType

    Gets or sets the ribbon action size.

    Declaration
    public DisplayType DisplayType { get; set; }
    Property Value
    Type Description
    DisplayType
    Remarks

    This should be set before adding the action to a commandbar.

    Enabled

    Gets or sets whether this action is currently enabled.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    If an action is not enabled, it is shown is greyed out on the command bar.

    Extension

    Gets or sets the extension.

    Declaration
    public IExtension Extension { get; set; }
    Property Value
    Type Description
    IExtension

    The extension.

    Icon

    Gets or sets the icon for this action. Can be null.

    Declaration
    public Icon Icon { get; set; }
    Property Value
    Type Description
    System.Drawing.Icon

    Id

    Gets or sets the unique id for this action.

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This id is unique across the Studio.

    Style

    Gets or sets the action style.

    Declaration
    public ActionStyle Style { get; set; }
    Property Value
    Type Description
    ActionStyle
    Remarks

    This should be set before adding the action to a commandbar.

    Text

    Gets or sets the text for this action.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Can contain an ampersand to indicate the mnemonic character.

    ToolTipText

    Gets or sets the tooltip test for this action.

    Declaration
    public string ToolTipText { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    Execute()

    Called when the user activates this action. Override this method to perform the action logic.

    Declaration
    protected abstract void Execute()

    Initialize()

    Executed when the action is initialized.

    Declaration
    public virtual void Initialize()

    OnPropertyChanged(ActionPropertyChangedEventArgs)

    Raises the PropertyChanged event.

    Declaration
    protected virtual void OnPropertyChanged(ActionPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    ActionPropertyChangedEventArgs e

    The event arguments.

    Remarks

    When overriding this method, make sure to call the base class implementation, so the event is raised.

    Events

    AfterActionExecuted

    Called after action is executed

    Declaration
    public event EventHandler<ActionExecutionEventArgs> AfterActionExecuted
    Event Type
    Type Description
    System.EventHandler<ActionExecutionEventArgs>

    BeforeActionExecuted

    Called before action is executed

    Declaration
    public event EventHandler<ActionExecutionCancelEventArgs> BeforeActionExecuted
    Event Type
    Type Description
    System.EventHandler<ActionExecutionCancelEventArgs>

    PropertyChanged

    Raised when the value of one of the action's properties changed.

    Declaration
    public event EventHandler<ActionPropertyChangedEventArgs> PropertyChanged
    Event Type
    Type Description
    System.EventHandler<ActionPropertyChangedEventArgs>
    Remarks

    For possible property values, see the constants defined in ActionProperties.

    Explicit Interface Implementations

    IAction.Execute()

    Declaration
    bool IAction.Execute()
    Returns
    Type Description
    System.Boolean

    Implements

    IAction
    IExtensionAware

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(Object, Action<Window>)

    On this page

    • Constructors
      • AbstractAction()
    • Properties
      • ActionAttribute
      • ActionGroup
      • Available
      • Checked
      • DisplayType
      • Enabled
      • Extension
      • Icon
      • Id
      • Style
      • Text
      • ToolTipText
    • Methods
      • Execute()
      • Initialize()
      • OnPropertyChanged(ActionPropertyChangedEventArgs)
    • Events
      • AfterActionExecuted
      • BeforeActionExecuted
      • PropertyChanged
    • Explicit Interface Implementations
      • IAction.Execute()
    • Implements
    • Extension Methods
    Back to top Generated by DocFX