CheckListBox


Display a Window containing a list of items, allow the user to select one or more and return the selected items



XAML


∇ xaml←CheckListBoxXAML
⍝ XAML for the CheckListBox example
 xaml←⊂'<Window'
 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.Tools.WPF"'
 xaml,←⊂'    SizeToContent="WidthandHeight" >'
 xaml,←⊂'    <StackPanel>'
 xaml,←⊂'        <sftools:CheckListBox Name="checklist">'
 xaml,←⊂'        </sftools:CheckListBox>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'


Code


∇  z←CheckListBox items;⎕IO;⎕ML;xaml;⎕USING;item
⍝ Simple CheckListBox example
 ⎕IO ⎕ML←0 3
 xaml←CheckListBoxXAML
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 window_checklist←#.window.FindName⊂'checklist'
 :For item :In items
     {}window_checklist.Items.Add⊂item
 :EndFor
 {}#.window.ShowDialog
 z←⌷window_checklist.SelectedItems


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

'Syncfusion.Windows.Shared,Syncfusion/4.5/Syncfusion.Shared.WPF.dll'
'SyncFusion.Windows.Tools.Controls,Syncfusion/4.5/Syncfusion.Tools.WPF.dll

 to the ⎕USING list of
LoadXAML

Operation


      #.CheckListBox.CheckListBox'this' 'that' 'the other'  
 this  the other

Unresolved Issues


Exploring various properties.