Barcode


Display a Window containing a QR Barcode (specifying the text and size).



XAML


∇  xaml←BarcodeXAML size
⍝ XAML for the Barcode 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.UI.Xaml.Controls.Barcode;assembly=SyncFusion.SfBarcode.WPF"'
 xaml,←⊂'    SizeToContent="Height" Width="400">'
 xaml,←⊂'    <StackPanel>'
 xaml,←⊂'        <sftools:SfBarcode Name="barcode" Symbology="QRBarcode">'
 xaml,←⊂'           <sftools:SfBarcode.SymbologySettings>'
 xaml,←⊂'               <sftools:QRBarcodeSetting XDimension="',(⍕size),'" />'
 xaml,←⊂'           </sftools:SfBarcode.SymbologySettings>'
 xaml,←⊂'        </sftools:SfBarcode>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>' 


Code


Barcode(text size);⎕IO;⎕ML;xaml
⍝ Simple Barcode example
 ⎕IO ⎕ML←0 3
 xaml←BarcodeXAML size
 win←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 win_barcode←win.FindName⊂'barcode'
 win_barcode.Text←text
 {}win.ShowDialog


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

'Syncfusion.SfBarcode.WPF,Syncfusion/4.5/Syncfusion.SfBarcode.WPF.dll'


to the ⎕using list of LoadXAML

Operation


#.Barcode.Barcode 'I like APL' 8

There are a lot of apparently intertwined options for this control, which probably means that XAML has to be constructed case-by-case rather than generalised with parameters to any great degree.

Unresolved Issues


Explore more properties