⎕USING←'' 'System.Windows,WPF/PresentationFramework.DLL'
⎕USING,←⊂'System.Windows.Controls'
btn←⎕NEW Button
btn #.WPF.Event.Add 'Click' 'foo' (Other Data)
foo ⍝ Add lists all handlers as its result
In XAML:
Code: Select all
xmlns:apl="clr-namespace:MJHSoftware;assembly=MJHSoftware.APLExtension"
<Button Click="{apl:Event foo,Left=Other Data}" />
where function foo has the form:
∇ {la} foo(Sender e)
[1] e.Handled←1 ⍝ Marks the event as "handled"
∇
In the XAML case, only the text 'Other Data' is passed as the left argument while in the APL version Other and Data are APL arrays.