ImageGear .NET
ThumbnailListBoxStyle

The following template defines a style that determines what type of panel is used in the Thumbnail control. It is a WrapPanel by default. User can overwrite this style in his application to use StackPanel, Panel etc, using given properties (like Margin, Background in current implementation). In this case it is necessary to overwrite main style for thumbnail control to set ListBox Style property to newly created style.

XAML
Copy Code
<Style TargetType="{x:Type ListBox}" x:Key="ThumbnailListBoxStyle 
    <Setter Property="Template 
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ListBox} 
          <WrapPanel IsItemsHost="True" Orientation="Horizontal" 
                     Background="{Binding Background}"
                     Margin="{Binding Margin}"
                     ItemWidth="{Binding CellSize.Width}"
                     ItemHeight="{Binding CellSize.Height} 
          </WrapPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback