RecordInit Method

OpenText Functional Testing 2022 and later: Following the discontinuance of the Silverlight development framework, OpenText Functional Testing no longer supports the Silverlight Add-in by default.

If you need to use and extend the Silverlight Add-in, contact OpenText Support.

Registers event handlers.

Remarks

To hook a control's events, override this method and register your event handlers in one of these ways, or a combination of them:

  • Define and add Event handlers with the IUtilityObject.AddHandler method.

    _hExpanded = new RoutedEventHandler(OnExpanded); 
    UtilityObject.AddHandler(UtilityObject.ApplicationObject as UIElement, "Expanded", hExpanded);


    There is no limit to the number of handlers defined this way.
  • Use the syntax: myApplicationObject.ValueChanged += e;

    If you use this syntax, override IRecord.RecordStop to unsubscribe from Event handling.

It is preferable to use AddHandlerrather than the '+=' syntax. If you use AddHandler, your handler is automatically removed at the end of the Record session.

Syntax

Visual Basic (Declaration)
Overridable Sub RecordInit() 
C#
virtual void RecordInit()