| i have a small project i'm working on thats Similar to the RSS Feeder in the Vista SideBar...So the Question is where can i get a good example for Scrolling the RSS Feeds Upon the ListBox being Populated??
As of right now my project just uses a Veritcal ScrollBar,i want it to Auto Scroll on its own as the Feeds are Feed into the project,and have a Fading appearance,as the Feeds reach the top of the ListBox
Right now i use the following which scrolls the entire list box. I need to scroll only the items inside the listbox and to fade it out on reaching the top of the listbox.
<DataTemplate x:Key="dt1"> <TextBlock Height="30"> <TextBlock Text="{Binding}"/> </Hyperlink> </TextBlock> </DataTemplate> </Window.Resources>
<Canvas Width="150" Height="200"> <ListBox Name="list1" Width="150" Height="200" BorderBrush="{x:Null}" ItemTemplate="{StaticResource dt1}" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Hidden">
<ListBox.Style> <Style> <Style.Triggers> <EventTrigger RoutedEvent="ListBox.Loaded"> <EventTrigger.Actions> <BeginStoryboard Name="MyBeginStoryboard"> <Storyboard Storyboard.TargetProperty="(Canvas.Top)"> <DoubleAnimation From ="220" To ="-250" RepeatBehavior="Forever" Duration="0:0:5"></DoubleAnimation> </Storyboard> </BeginStoryboard> </EventTrigger.Actions> </EventTrigger> <EventTrigger RoutedEvent="ListBox.MouseMove"> <EventTrigger.Actions> <PauseStoryboard BeginStoryboardName="MyBeginStoryboard" /> </EventTrigger.Actions> </EventTrigger> <EventTrigger RoutedEvent="ListBox.MouseLeave"> <EventTrigger.Actions> <ResumeStoryboard BeginStoryboardName="MyBeginStoryboard" /> </EventTrigger.Actions> </EventTrigger> </Style.Triggers> </Style> </ListBox.Style> </ListBox> </Canvas>
Thanks lee d
|