Click or drag to resize

EventHandlerWithWpfArg Class

This is an example of of wrapping a method with an ExternalEventHandler using an instance of WPF as an argument. Any type of argument can be passed to the RevitEventWrapper, and therefore be used in the execution of a method which has to take place within a "Valid Revit API Context". This specific pattern can be useful for smaller applications, where it is convenient to access the WPF properties directly, but can become cumbersome in larger application architectures. At that point, it is suggested to use more "low-level" wrapping, as with the string-argument-wrapped method above.
Inheritance Hierarchy
SystemObject
  RevitTemplateRevitEventWrapperUi
    RevitTemplateEventHandlerWithWpfArg

Namespace:  RevitTemplate
Assembly:  RevitTemplate (in RevitTemplate.dll) Version: 2019.1.0.0 (2019.1)
Syntax
public class EventHandlerWithWpfArg : RevitEventWrapper<Ui>

The EventHandlerWithWpfArg type exposes the following members.

Constructors
  NameDescription
Public methodEventHandlerWithWpfArg
Initializes a new instance of the EventHandlerWithWpfArg class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExecute(UIApplication) (Inherited from RevitEventWrapperTType.)
Public methodExecute(UIApplication, Ui)
The Execute override void must be present in all methods wrapped by the RevitEventWrapper. This defines what the method will do when raised externally.
(Overrides RevitEventWrapperTTypeExecute(UIApplication, TType).)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetName (Inherited from RevitEventWrapperTType.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRaise (Inherited from RevitEventWrapperTType.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
See Also