Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Starting animation on MouseEnter

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-31-2006   #1 (permalink)
Corrado Cavalli [MVP]
Guest


 

Starting animation on MouseEnter

I'd like to start a simple doubleanimation when user moves mouse over a
button, tried all alternatives but can't find any solution.
Does anybody has a simple snippet to share?

Thanks

--
Corrado Cavalli [Microsoft .NET MVP-MCP]
UGIdotNET - http://www.ugidotnet.org
Weblog: http://blogs.ugidotnet.org/corrado




My System SpecsSystem Spec
Old 01-31-2006   #2 (permalink)
David Barkol
Guest


 

Re: Starting animation on MouseEnter

The snippet below will enlarge the font size, it's very simple but
should get you started:

<Style TargetType="{x:Type Button}">
<Style.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Duration="0:0:2"
Storyboard.TargetProperty="FontSize" To="50" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="Mouse.MouseLeave">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Duration="0:0:1"
Storyboard.TargetProperty="FontSize" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Style.Triggers>
</Style>

David Barkol
www.neudesic.com

My System SpecsSystem Spec
Old 01-31-2006   #3 (permalink)
Corrado Cavalli [MVP]
Guest


 

Re: Starting animation on MouseEnter

Thanks David,
That's what i needed :-)


--
Corrado Cavalli [Microsoft .NET MVP-MCP]
UGIdotNET - http://www.ugidotnet.org
Weblog: http://blogs.ugidotnet.org/corrado



My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Databound animation Joao Paulo Duque Vieira Avalon 4 04-13-2008 11:28 AM
Starting MCE 'Live TV' as default Screen when starting after Sleep DJ Vista General 2 11-04-2007 09:57 AM
Icon animation Ed Dixon Vista General 7 04-29-2006 05:36 PM
Animation + Animation MueMeister Avalon 1 01-10-2006 03:53 PM
3D Animation viliescu Avalon 2 01-10-2006 03:53 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51