callMethod

callMethod(controlName: String;
           memberName:  String;
           paramList:   ParamListType);

The callMethod method of the JadeXamlControl class enables you to execute a Windows Presentation Foundation (WPF) method on an entity of the XAML control.

The parameters are combined to form a sequence of accesses to the WPF entities involved. The JADE method parameters are a mixture of property names, method names, and WPF method parameters, as described in the following table.

Parameter Description
controlName Name of the WPF FrameworkElement involved. If the name is null or equal to the control name, the search for the memberName starts with the parent control; otherwise the search starts with the first child element with the specified name. The search succeeds when the entity or one of its children is found to have the specified memberName value. An exception is raised if the controlName or memberName is not found.
memberName Name of the first method or property being accessed.
paramList Remaining property, methods, and parameters being used in sequence.

The code fragments in the following examples show the use of these parameters.

jadeXamlCtl.callMethod(null, "BringIntoView");
     // brings the base XAML control into view
jadeXamlCtl.callMethod("list", "BringIntoView");
     // brings the child control named "list" into view
jadeXamlCtl.callMethod("list", "SelectedItem", "BringIntoView");
     // brings the currently selected item of a list box into view by
     // executing the WPF sequence: list.SelectedItem.BringIntoView
JadeXamlCtl.callMethod("list", "Items", "GetItemAt", 2, "BringIntoView")
     // brings the second item of the Items 'collection' property of the
     // "list" ListBox item to be brought into view by executing the
     // WPF sequence:  list.Items.GetItemAt(2).BringIntoView.

Note the following restrictions.