setValue(controlName: String; memberName: String; paramList: ParamListType);
The setValue method of the JadeXamlControl class sets the value of a WPF property for an entity of a 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, with the last parameter containing the primitive value to be set. 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 used in sequence. The final parameter is the value being set. |
The code fragments in the following examples show how these parameters are used.
jadeXamlCtl.setValue("list", "SelectedIndex", 3); // sets the integer value of the currently selected item of the // list box entity named "list" to 3 by executing the WPF sequence // list.SelectedIndex = 3. jadeXamlCtl.setValue("list", "SelectedItem", "Content", "new text"); // sets the content of the currently selected item of the list box // to "new text" by executing the WPF sequence // list.SelectedItem.Content = "new text" jadeXamlCtl.setValue("list", "Items", "GetItemAt", 3, "Content", "Customer") // sets the content of the list box entry with an index of 3 to // "Customer", by executing the WPF sequence // list.Items.GetItemAt(3).Contents= "Customer"
Note the following restrictions.
Only JADE primitives types are supported as parameters to WPF method calls.
Access to static WPF properties and methods is not supported.
The last parameter is the value to be set.
The penultimate parameter is the name of a WPF property that can be set.
Parameter types must match the same basic type; that is, an
For a thin client, calls to this method are buffered (the application server does not wait for a reply). If a call fails, an exception is raised. However the current line of logic listed as causing the exception does not indicate where the method was called.