FontListComboBox


Display a combobox which allows the user to select a font family



XAML


∇  xaml←FontListComboBoxXAML w
⍝ XAML for the FontListComboBox 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="WidthandHeight" >'
 xaml,←⊂'    <StackPanel>'
 xaml,←⊂'        <sftools:FontListComboBox Name="flcbo" SelectedFontFamily="',w,'">'
 xaml,←⊂'        </sftools:FontListComboBox>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'


Code


∇  z←FontListComboBox w;⎕IO;⎕ML;xaml;⎕USING;brush
⍝ Simple FontListComboBox example
 ⎕IO ⎕ML←0 3
 xaml←FontListComboBoxXAML w
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 window_fontlistcombo←#.window.FindName⊂'flcbo'
 {}#.window.ShowDialog
 z←window_fontlistcombo.SelectedFontFamily


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 (note that the SyncFusion documentation is (to say the least) misleading for this control)

Operation


       #.FontListComboBox.FontListComboBox 'Arial' 
APL385 Unicode


Unresolved Issues