ImageGear for .NET User Guide > Using ImageGear for .NET > Using ImageGear.WPF Namespace > XAML GUI Controls and Templates > Thumbnail > ImGearThumbnailItem |
The following template is used by framework to show ImGearThumbnailItem Class in any Panel control. This data template is only related to ImGearThumbnailItem Class data type and does not depend on the container type. ImGearThumbnailItem Class data template consists of shadow, border, image and label.
XAML |
Copy Code |
---|---|
<!-- Thumbnail Template --> <DataTemplate DataType="{x:Type local:ImGearThumbnailItem} <Grid VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0" > <!-- Drop Shadow --> <Border VerticalAlignment="Top" HorizontalAlignment="Left" Width="{Binding ParentCtl.ItemWidth}" Height="{Binding ParentCtl.ItemHeight}" CornerRadius="{Binding ParentCtl.BorderWidth}" Background="#55000000" Visibility="{Binding ParentCtl.ShadowsVisibility}" > <!-- Drop Shadow shift and blur effect--> <Border.RenderTransform> <TranslateTransform X="{Binding ParentCtl.ShadowWidth}" Y="{Binding ParentCtl.ShadowWidth}" /> </Border.RenderTransform> <Border.BitmapEffect> <BlurBitmapEffect Radius="{Binding Path=ParentCtl.ShadowWidth}" /> </Border.BitmapEffect> </Border> <!aBorder (select and highlight)--> <Border x:Name="IGThumbnailSelectionBorder" VerticalAlignment="Top" HorizontalAlignment="Left" BorderThickness="{Binding ParentCtl.BorderWidth}" BorderBrush="{Binding CurrentBackground}" CornerRadius="{Binding ParentCtl.BorderWidth}" Background="White" Width="{Binding ParentCtl.ItemWidth}" Height="{Binding ParentCtl.ItemHeight} <StackPanel Orientation="Vertical" Margin= "{Binding ParentCtl.Interior} <!aThumbnail image--> <Image Width="{Binding ParentCtl.ImageSize.Width}" Height="{Binding ParentCtl.ImageSize.Height}" VerticalAlignment="Center" HorizontalAlignment="Center" Source ="{Binding Image}"/> <!a-Title--> <Label Content="{Binding Title}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground ="{Binding CurrentForeground}" Visibility ="{Binding ParentCtl.TitlesVisibility}" > </Label> </StackPanel> </Border> </Grid> </DataTemplate> |