MacroAction Class
Represents an IEditAction that contains a list of IEditAction objects that can be executed in a macro.
public class MacroAction : EditActionBase, IMacroAction, IEditAction, IKeyedObject
- Inheritance:
- object RoutedCommand RoutedUICommand EditActionBase object
- Implements:
- IMacroAction IEditAction IKeyedObject
Constructors
MacroAction()
Initializes an instance of the class.
public MacroAction()
Properties
CanRecordInMacro
Indicates whether the action can be recorded in a macro.
public override bool CanRecordInMacro { get; }
Property Value
- bool:
trueif the action can be recorded in a macro; otherwise,false.
Count
The number of actions in the macro.
IsEmpty
Indicates whether the macro action is empty and doesn't currently contain any child IEditAction objects.
public bool IsEmpty { get; }
Property Value
- bool:
trueif the macro action is empty and doesn't currently contain any child IEditAction objects; otherwise,false.
this[int]
The IEditAction at the specified index.
public IEditAction this[int index] { get; }
| Parameter | Type | Description |
|---|---|---|
| index | int | The index of the IEditAction to return. |
Property Value
Methods
Add(IEditAction)
Adds the specified IEditAction to the macro action.
public void Add(IEditAction action)
| Parameter | Type | Description |
|---|---|---|
| action | IEditAction | The IEditAction to add. |
Execute(IEditorView)
Executes the edit action in the specified IEditorView.
public override void Execute(IEditorView view)
| Parameter | Type | Description |
|---|---|---|
| view | IEditorView | The IEditorView in which to execute the edit action. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<IEditAction> GetEnumerator()
Returns
- IEnumerator<IEditAction>:
An enumerator that can be used to iterate through the collection.
ReadFromXml(XmlReader)
Deserializes the data for the IEditAction from XML.
public override void ReadFromXml(XmlReader reader)
| Parameter | Type | Description |
|---|---|---|
| reader | XmlReader | The System.Xml.XmlReader to use. |
Remarks
This method is used for macro serialization.
WriteToXml(XmlWriter)
Serializes the data for the IEditAction to XML.
public override void WriteToXml(XmlWriter writer)
| Parameter | Type | Description |
|---|---|---|
| writer | XmlWriter | The System.Xml.XmlWriter to use. |
Remarks
This method is used for macro serialization.
Inherited Members
- EditActionBase.CanExecute(IEditorView)
- EditActionBase.GetKeyText(ModifierKeys, Key)
- EditActionBase.CreateCommandBinding()
- EditActionBase.CreateCommandBinding(ICommand)
- EditActionBase.Key
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()