RangeSliderControl


Display a Window containing a RangeSliderControl, allow the user to modify the range and return the selected when the window is closed



XAML


∇  xaml←RangeSliderControlXAML
⍝ XAML for the RangeSliderControl 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="Height" Width="400">'
 xaml,←⊂'    <StackPanel>'
 xaml,←⊂'        <sftools:RangeSliderControl Name="rangeslider">'
 xaml,←⊂'        </sftools:RangeSliderControl>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'


Code


∇ z←RangeSliderControl w;⎕IO;⎕ML;xaml;⎕USING
⍝ Simple RangeSliderControl example
 ⎕IO ⎕ML←0 3
 xaml←RangeSliderControlXAML
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 window_rangeslider←#.window.FindName⊂'rangeslider'
 ⎕USING←,⊂'Syncfusion.Windows.Tools.Controls,Syncfusion/4.5/Syncfusion.tools.WPF.dll'
 window_rangeslider.Range←⎕NEW DoubleRange w
 {}#.window.ShowDialog
 z←window_rangeslider.Range.(Start End)


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

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

 to the ⎕USING list of
LoadXAML

Quite why the name has "Control" on the end escapes me, since most of the Syncfusion controls don't follow this windbag convention.

Notice also that we seem to have no direct control over the size of a RangeSliderControl - it seems to try to fill the available space.

Operation


      #.RangeSliderControl.RangeSliderControl 20 80   
23 84

Unresolved Issues


Is there a way to explicitly set the control width?
Are there other properties which might be useful?