I am creating a messages ticker for my application.
<UserControl.Resources>
<DataTemplate x:Key="MessagesDataTemplate">
<TextBlock
FontWeight="Bold"
FontSize="12"
Text="{Binding Path=Message}"
Height="30"
Margin="2"/>
</DataTemplate>
</UserControl.Resources>
<Grid>
<ItemsControl
ItemsSource="{Binding Messages}"
ItemTemplate="{StaticResource MessagesDataTemplate}">
</ItemsControl>
</Grid>
I want to display a Message item (i.e. the TextBlock) for 5 seconds then move to the next item (vertically).
Can anyone guide me on this please?
I have created a sample
here is xaml and code behind for that
Code Behind