eventItemName

eventItemName(): String;

The eventItemName method of the JadeXamlControl class returns the name of the element of the XAML control for which a standard JADE event has occurred. This method can be used in logic to determine the element of the XAML content that issued the event.

In thin client mode, it does not cause a message to be sent to the presentation client.

In the following example, the XAML content for a control defines two buttons.

jadeXamlCtl.xaml :=
  '<Canvas Name="SimpleExample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
    <Button Canvas.Top="20" Canvas.Left="50" Content="Hello World" />
    <Button Name="Hi" Canvas.Top="20" Canvas.Left="50" Content="Hello" />
    <Button Name="Bye" Canvas.Top="60" Canvas.Left="50" Content="Bye" />
  </Canvas>';

The eventItemName method returns the name of the button that was clicked, as shown in the following example.

jadeXamlCtl_click(jadeXamlControl: JadeXamlControl input) updating;
begin
  write jadeXamlCtl.eventItemName; // Outputs "Hi", "Bye", or "jadeXamlCtl"
end;