TimeSpanEdit


Display a window containing a TimeSpanEdit control showing days hours minutes seconds, return the changed values when the window is closed.


XAML


    ∇  xaml←TimeSpanEditXAML
⍝ XAML for the TimeSpanEdit 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:TimeSpanEdit Name="tsedit" Format="d ''days'' h : m : s ">'
 xaml,←⊂'        </sftools:TimeSpanEdit>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'
    ∇

Code

    ∇  z←TimeSpanEdit w;⎕IO;⎕ML;xaml;⎕USING
⍝ Simple TimeSpanEdit example
 ⎕IO ⎕ML←0 3
 xaml←TimeSpanEditXAML
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 window_tsedit←#.window.FindName⊂'tsedit'
 ⎕USING←,⊂''
 window_tsedit.Value←⎕NEW System.TimeSpan w
 {}#.window.ShowDialog
 z←window_tsedit.Value.(Days Hours Minutes Seconds)
    ∇


Operation

      #.TimeSpanEdit.TimeSpanEdit  1 2 3 4
1 22 3 4


Unresolved Issues