How do I...Set the SaveAs Command to a Button

Using Microsoft Windows Presentation Foundation and Syncfusion WPF Libraries

How do I...Set the SaveAs Command to a Button

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

In APL:
      ⎕USING←'' 'System.Windows,WPF/PresentationFramework.DLL'
⎕USING,←⊂'System.Windows.Controls'
btn←⎕NEW Button
btn #.WPF.SetCommand'ApplicationCommands.SaveAs'


In XAML:

Code: Select all
xmlns:apl="clr-namespace:MJHSoftware;assembly=MJHSoftware.APLExtension"
<Button Command="{apl:Command SaveAs}" />


where the call back functions are:

      ∇ CanExecuteMyCmd(sender args)
[1] :Signature CanExecuteMyCmd Object,CanExecuteRoutedEventArgs
[2] args.CanExecute←condition


∇ ExecutedMyCommand(sender args)
[1] :Signature ExecutedMyCommand Object,ExecutedRoutedEventArgs
[2]
[3] … code
[4]
User avatar
Fiona|Dyalog
 
Posts: 52
Joined: Mon Apr 22, 2013 12:59 pm

Return to WPF & Syncfusion

Who is online

Users browsing this forum: No registered users and 0 guests