Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
 

Scroll Banner or Text in Silverlight

Article:
Viewed:  1283 
Posted On:  03/10/2012 18:40:24 
In this article I am going to show how we can scroll text or banner in silverlight. 

In this article I am going to show how we can scroll text or banner in silverlight. This is my XAML code...

<UserControl x:Class="ScrollingBannerInSilverlight.MainPage"    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"    mc:Ignorable="d"    d:DesignHeight="300" d:DesignWidth="400">    <Canvas xmlns="http://schemas.microsoft.com/client/2007"   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <Canvas.Triggers>
            <EventTrigger RoutedEvent="Canvas.Loaded" >
                <BeginStoryboard>
                    <Storyboard x:Name="animation" Storyboard.TargetProperty="(Canvas.Left)"RepeatBehavior="Forever" >
                        <DoubleAnimation Storyboard.TargetName="ScrollText" From="0" To="-820"Duration="0:0:10"  />
                        <DoubleAnimation Storyboard.TargetName="ScrollText1" From="820" To="0"Duration="0:0:10"  />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Canvas.Triggers>
        <TextBlock x:Name="ScrollText" FontFamily="Verdana" FontSize="36" Foreground="Blue" Text="Welcome to silverlight word." />
        <TextBlock x:Name="ScrollText1" FontFamily="Verdana" FontSize="36" Foreground="Blue"Text="Welcome to silverlight word." />
    </Canvas>
</UserControl> 

When we run the application then.

Scrolling Banne rImage1.JPG

Image 1.

Scrolling BannerImage2.JPG

Image 2.

  Comment:
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us