CurrencyTextBox


Display a Window containing with a label and prefilled currency value, retrieve the (changed) currency value when the user closes the window.



XAML


∇ xaml←CurrencyTextBoxXAML
⍝ XAML for the CurrencyTextBox 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,←⊂'        <Label Content="How much is the train fare to Bramley?"/>'
 xaml,←⊂'        <sftools:CurrencyTextBox Name="curbox"/>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'


Code


∇ z←CurrencyTextBox w;⎕IO;⎕ML;xaml;⎕USING
⍝ Simple CurrencyTextBox example
 ⎕IO ⎕ML←0 3
 ⎕USING←,⊂'System'
 xaml←CurrencyTextBoxXAML
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 window_curbox←#.window.FindName⊂'curbox'
 window_curbox.Value←w
 {}#.window.ShowDialog
 z←window_curbox.Value


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


      #.CurrencyTextBox.CurrencyTextBox 22.3
22.99

Unresolved Issues


Exploring various properties.