TaskBar


Display a Window containing a TaskBar with two TaskBarItems, respond to mouse entering these.



XAML


∇  xaml←TaskBarXAML
⍝ XAML for the TaskBar 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:TaskBar Width="200" Name="tbar">'
 xaml,←⊂'          <sftools:TaskBarItem Name="tbariA" Header="Option A"/>'
 xaml,←⊂'          <sftools:TaskBarItem Name="tbariB" Header="Option B"/>'
 xaml,←⊂'        </sftools:TaskBar>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'


Code


∇  TaskBar entries;⎕IO;⎕ML;xaml
⍝ Simple TaskBar example
 ⎕IO ⎕ML←0 3
 xaml←TaskBarXAML
 window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 window_tbariA window_tbariB←{window.FindName⊂⍵}¨'tbariA' 'tbariB'
 (window_tbariA window_tbariB).onMouseEnter←⊂'#.TaskBar.MouseEnter'
 {}window.ShowDialog


∇ MouseEnter w;⎕IO;⎕ML
⍝ Respond to MouseEnter on TaskBarItem
 ⎕IO ⎕ML←0 3
 ⎕←'Mouse entered ',(↑w).Name


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

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

 to the ⎕USING list of LoadXAML.

Note the explicit setting of Width (if this isn't done then sizing has a will of its own).

Operation


      #.TaskBar.TaskBar ⍬   
Mouse entered tbariA
Mouse entered tbariB
Mouse entered tbariA           

Unresolved Issues