ImageGear .NET
ImGearThumbnailCtl

The following template defines ImGearThumbnailCtl Class style and consists of ScrollViewer with binding, ScrollBarVisibility dependency property, and ListBox control with another binded property (SelectionMode), items source (ItemsSource="{Binding Path = Thumbnails}") and overridden styles, called ThumbnailListBoxItemStyle for generic items and ThumbnailListBoxStyle for ListBox itself. 

XAML
Copy Code
  <Style TargetType="{x:Type local:ImGearThumbnailCtl} 
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="Template 
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type local:ImGearThumbnailCtl} 
          <ScrollViewer 
            VerticalScrollBarVisibility="{Binding ScrollBarVisibility}" 
            HorizontalScrollBarVisibility="Disabled"
            Background ="{Binding Background} 
            <ListBox
                IsSynchronizedWithCurrentItem="True"
                Name="ThumbnailListBox" 
                SelectedIndex="0"
                SelectionMode="{Binding SelectionMode}"
                Style ="{StaticResource ThumbnailListBoxStyle}" 
                ItemsSource="{Binding Path = Thumbnails}"
                ItemContainerStyle =
"{StaticResource ThumbnailListBoxItemStyle}"
                >
            </ListBox>
          </ScrollViewer>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback