UpDown


Display a control which allows the user to specify a value within a range, either by spinning up/down buttons or by typing a value (only allow integer input)



XAML


∇  xaml←UpDownXAML
⍝ XAML for the UpDown 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.Shared;assembly=SyncFusion.Shared.WPF"'
 xaml,←⊂'    SizeToContent="WidthandHeight" >'
 xaml,←⊂'    <StackPanel>'
 xaml,←⊂'        <sftools:UpDown Name="updown" NumberDecimalDigits="0" AllowEdit="True">'
 xaml,←⊂'        </sftools:UpDown>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'


Code


∇  z←UpDown w;⎕IO;⎕ML;xaml;⎕USING
⍝ Simple UpDown example
 ⎕IO ⎕ML←0 3
 xaml←UpDownXAML
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 window_updown←#.window.FindName⊂'updown'
 window_updown.(MinValue MaxValue Value)←w
 {}#.window.ShowDialog
 z←window_updown.Value 



The 'SyncTools' argument to #.UTIL.LoadXAML has the effect of adding 'Syncfusion.Windows.Shared,Syncfusion/4.5/Syncfusion.Shared.WPF.dll' to the ⎕USING list of LoadXAML

Operation


       #.UpDown.UpDown 32 212 88    
44

Unresolved Issues