Carousel


Arrange a set of items along a (circular) path, allowing the user to select one - the selected item appearing at the top (if the path is - as here - circular)



XAML


xaml←CarouselXAML
⍝ XAML for the Carousel 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:Carousel Name="carousel" Height="200" Width="200" RadiusX="50" RadiusY="50">'
 xaml,←⊂'        </sftools:Carousel>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'


Code


z←Carousel w;⎕IO;⎕ML;xaml;⎕USING;item;citem;al
⍝ Simple Carousel example
 ⎕IO ⎕ML←0 3
 xaml←CarouselXAML
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 window_carousel←#.window.FindName⊂'carousel'
 ⎕USING←,⊂'Syncfusion.Windows.Shared,Syncfusion/4.5/Syncfusion.Shared.WPF.dll'
 :For item :In w
     citem←⎕NEW CarouselItem
     citem.Content←item
     {}window_carousel.Items.Add citem
 :EndFor
 window_carousel.SelectedIndex←0
 {}#.window.ShowDialog
 z←window_carousel.SelectedIndex


This really is something of a dog, only prolonged experimentation made something where the effect is visible - there's a lot in the SyncFusion documentation about Data and Item templates which suggests that those with the time and temperament can gain a lot of control over appearance.

The 'SyncTools' argument to #.UTIL.LoadXAML has the effect of adding 'Syncfusion.Windows.Shared,Syncfusion/4.5/Syncfusion.Shared.WPF.dll' to the ⎕USING list of LoadXAML

Operation


      #.Carousel.Carousel 'this' 'that' 'the other'    


Unresolved Issues