Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 963
  • Last Modified:

fade effects to ListBox.ItemTemplate

i have a listbox control in silverlight and i am binding the source of ListBox.ItemTemplate dynamically. How can i give fade effects to each item?
<Grid x:Name="LayoutRoot" Background="Beige" HorizontalAlignment="Center" Width="Auto">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1300" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <ContentControl Content="Select a Template" Grid.Row="0" Grid.Column="0" Margin="4" />
            <ListBox Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" 
                  x:Name="thumbs"
                  Style="{StaticResource WrapListBox}"                  
                  Margin="0" >
                <ListBox.ItemTemplate>
                    <!-- DataTemplate for Photograph i  nstances -->
                    <DataTemplate x:Name="PhotographTemplate">
                        <Grid Margin="6">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <controls:Viewbox Height="100" Width="100" VerticalAlignment="Bottom">
                                <Border BorderBrush="#FF999999" BorderThickness="2" Padding="10">
                                    <Image x:Name="Thumbnail" Source="{Binding Thumbnail}"  >
                                    </Image>
                                </Border>
                            </controls:Viewbox>
                            <ContentControl Grid.Row="1" Content="{Binding Name}" HorizontalAlignment="Center" FontSize="10" />
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <Image x:Name="Thumbnail1" Source="Template.jpg" Opacity="0"  >
            </Image>
        </Grid>

Open in new window

0
x1877
Asked:
x1877
1 Solution
 
x1877Author Commented:
The first link is not working.
The second one is good
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now