Display a Window containing a ButtonAdv and respond to the user clicking on it


∇   xaml←ButtonAdvXAML
⍝ XAML for the ButtonAdv example
 xaml,←⊂'    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"'
 xaml,←⊂'    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"'
 xaml,←⊂'    xmlns:sftools="clr-namespace:Syncfusion.Windows.Tools.Controls;assembly=SyncFusion.Shared.WPF"'
 xaml,←⊂'    SizeToContent="WidthandHeight" >'
 xaml,←⊂'    <StackPanel>'
 xaml,←⊂'        <sftools:ButtonAdv Name="btnAdv" Label="Howdy">'
 xaml,←⊂'        </sftools:ButtonAdv>'
 xaml,←⊂'    </StackPanel>'


∇ ButtonAdv;⎕IO;⎕ML;xaml
⍝ Simple ButtonAdv example
 ⎕IO ⎕ML←0 3
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')

∇ Howdy w;⎕IO;⎕ML
⍝ Callback for Click on the ButtonAdv control
 ⎕IO ⎕ML←0 3
 ⎕←'Howdy to you too'

The 'SyncTools' argument to #.UTIL.LoadXAML has the effect of adding


 to the ⎕USING list of

At this level there's no obvious advantage over WPF's native Button except that the default icon is a bit intrusive; to keep the sample code self-contained I've omitted any icon properties (they need to reference an image file - SyncFusion's documentation in this instance should be obvious enough).  Where ButtonAdv seems to have the edge is that it avoids the tedium of creating buttons with both labels and images, and the options for sizing (again, see the SyncFusion documentation).



Unresolved Issues

Nothing springing to mind at the moment - pending some use of this within applications.