Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Starting animation on MouseEnter

 
 
Old 01-31-2006   #1 (permalink)
Corrado Cavalli [MVP]


 
 

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


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
Activity animation Vista networking & sharing
Starting MCE 'Live TV' as default Screen when starting after Sleep Vista General


Vista Forums 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 Ltd

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