C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » ASP.NET/Web Applications »

Creating Animation:


Posted Date: 21 Nov 2008    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: shekharMember Level: Gold    
Rating: 1 out of 5Points: 3





DoubleAnimation is used to change the double data type value of the object. This value can the width, height or even the axis of the control. Let's check out how to use DoubleAnimation to increase the width of the Button control.

Here is the XAML code that makes up the button.





And here is the code that will animate the Button control.

private void Button_Click(object sender, RoutedEventArgs e)
{
DoubleAnimation animation = new DoubleAnimation();

animation.From = 100;
animation.To = 300;
animation.RepeatBehavior = RepeatBehavior.Forever;
Btn1.BeginAnimation(Button.WidthProperty, animation);
}


The above code will increase the width of the button control from 100 to 300. The RepeatBehavior property is set to Foreever which means that the width of the button will be increased from 100 to 300 in a loop.



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Creating DoubleAnimation:  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Validation Controls available in ASP.Net
Previous Resource: Overview ASP.NET Security Model
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use