How do I...Set a left arg to my Click event on a Button

Using Microsoft Windows Presentation Foundation and Syncfusion WPF Libraries

How do I...Set a left arg to my Click event on a Button

Postby Fiona|Dyalog on Wed Jul 30, 2014 10:40 am

In APL:

      ⎕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.
User avatar
Fiona|Dyalog
 
Posts: 68
Joined: Mon Apr 22, 2013 12:59 pm

Return to WPF & Syncfusion

Who is online

Users browsing this forum: No registered users and 1 guest