Click here to Skip to main content
15,917,005 members
Home / Discussions / WPF
   

WPF

 
QuestionReusable Animation Class Pin
Jammer2-May-08 7:32
Jammer2-May-08 7:32 
AnswerRe: Reusable Animation Class [modified] Pin
Insincere Dave2-May-08 11:42
Insincere Dave2-May-08 11:42 
GeneralRe: Reusable Animation Class Pin
Jammer2-May-08 12:53
Jammer2-May-08 12:53 
GeneralRe: Reusable Animation Class Pin
Jammer2-May-08 13:15
Jammer2-May-08 13:15 
public static class Animations
{
    public static void Fade(this UIElement control,double targetOpactity,int milliseconds)
    {
        control.BeginAnimation(UIElement.OpacityProperty,new DoubleAnimation(targetOpactity,new Duration(TimeSpan.FromMilliseconds(milliseconds))));
    }
}


This is genius!

I take it this is also working along the lines of WPF's handoff animations in that it doesn't care what the current opacity is and will simple animate to the target opacity from its current opacity setting.

Food for thought! Thanks!

Jammer

Going where everyone here has gone before! Smile | :)
My Blog

QuestionExpander Control Pin
Jammer2-May-08 4:24
Jammer2-May-08 4:24 
AnswerRe: Expander Control Pin
Jammer2-May-08 4:35
Jammer2-May-08 4:35 
QuestionError on Starting Sliver lights in VS 2008 Pin
Abhijit Jana2-May-08 0:25
professionalAbhijit Jana2-May-08 0:25 
AnswerRe: Error on Starting Sliver lights in VS 2008 Pin
Abhijit Jana2-May-08 7:36
professionalAbhijit Jana2-May-08 7:36 
NewsSource and Unit Tests available now for Silverlight 2 Beta 1 Controls Pin
brucedkyle1-May-08 11:49
brucedkyle1-May-08 11:49 
GeneralRe: Source and Unit Tests available now for Silverlight 2 Beta 1 Controls Pin
Michael Sync5-May-08 16:47
Michael Sync5-May-08 16:47 
QuestionTargetInvocationException [modified] Pin
Ian Grech1-May-08 10:39
Ian Grech1-May-08 10:39 
AnswerRe: TargetInvocationException Pin
Edmundisme1-May-08 10:51
Edmundisme1-May-08 10:51 
GeneralRe: TargetInvocationException Pin
Ian Grech1-May-08 11:08
Ian Grech1-May-08 11:08 
QuestionProperly display dynamic calculations in databinding? [modified] Pin
artwallacex30-Apr-08 12:15
artwallacex30-Apr-08 12:15 
AnswerRe: Properly display dynamic calculations in databinding? Pin
Pete O'Hanlon30-Apr-08 12:41
mvePete O'Hanlon30-Apr-08 12:41 
GeneralRe: Properly display dynamic calculations in databinding? [modified] Pin
artwallacex30-Apr-08 12:54
artwallacex30-Apr-08 12:54 
GeneralRe: Properly display dynamic calculations in databinding? Pin
User 27100930-Apr-08 15:07
User 27100930-Apr-08 15:07 
GeneralRe: Properly display dynamic calculations in databinding? Pin
artwallacex30-Apr-08 15:21
artwallacex30-Apr-08 15:21 
GeneralRe: Properly display dynamic calculations in databinding? Pin
User 27100930-Apr-08 15:37
User 27100930-Apr-08 15:37 
GeneralRe: Properly display dynamic calculations in databinding? Pin
artwallacex30-Apr-08 15:53
artwallacex30-Apr-08 15:53 
GeneralRe: Properly display dynamic calculations in databinding? Pin
User 27100930-Apr-08 16:01
User 27100930-Apr-08 16:01 
GeneralRe: Properly display dynamic calculations in databinding? Pin
artwallacex30-Apr-08 16:26
artwallacex30-Apr-08 16:26 
GeneralRe: Properly display dynamic calculations in databinding? Pin
Ed.Poore3-May-08 0:08
Ed.Poore3-May-08 0:08 
GeneralRe: Properly display dynamic calculations in databinding? [modified] Pin
artwallacex1-May-08 10:51
artwallacex1-May-08 10:51 
GeneralRe: Properly display dynamic calculations in databinding? Pin
User 2710092-May-08 15:18
User 2710092-May-08 15:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.