Silverlight list with vertical highlight effect required

I need a Silverlight list whose items automatically scroll (e.g. vertical area)

+4
source share
1 answer

You can try using ItemsControl set ItemsControl.ItemPanel to StackPanel with TranslateTransform applied to it. You can then start the storyboard, which adjusts the position of the Y coordinate of the translation transform.

EDIT: Example

 <Border BorderBrush="Black" BorderThickness="2" Height="100" Width="100" HorizontalAlignment="Left" VerticalAlignment="Top" > <Border.Clip> <RectangleGeometry Rect="0,0,100,100" /> </Border.Clip> <ItemsControl ItemsSource="{StaticResource Collection}"> <ItemsControl.RenderTransform> <TranslateTransform x:Name="Transform" /> </ItemsControl.RenderTransform> <i:Interaction.Triggers> <i:EventTrigger> <ei:ControlStoryboardAction Storyboard="{StaticResource TransformMove}"/> </i:EventTrigger> </i:Interaction.Triggers> </ItemsControl> </Border> 

Then include this storyboard in your management resources:

 <Storyboard x:Key="TransformMove" Storyboard.TargetName="Transform" Storyboard.TargetProperty="Y"> <DoubleAnimation From="-100" To="100" Duration="0:0:10" RepeatBehavior="Forever"/> </Storyboard> 
+3
source

Source: https://habr.com/ru/post/1310709/


All Articles