开发者

Silverlight 4 stackpanel fading in / out needed

开发者 https://www.devze.com 2022-12-31 22:14 出处:网络
I would like to add an animation to my stack-panel. when the mouse开发者_如何学Go is over it, the opacity has to be one. When the mouse is leaving it, the opacity decreases gradually.

I would like to add an animation to my stack-panel. when the mouse开发者_如何学Go is over it, the opacity has to be one. When the mouse is leaving it, the opacity decreases gradually. Could you please help me. Regards,


Create a Storyboard using timeline in Blend, I'm using Blend 4.

Fade In select the stackpanel

  1. Select Assets -> Behaviors -> drag and drop Changeproperty on the Stack Panel.
  2. goto Objects and Timeline -> Select ChangeProperty under Stackpanel -> goto Properties select Trigger Event Name:MouseEnter -> Next in Common Property, PropertyName:Opacity -> Next in Animation Add Duration:00:00:0.5

repeat the same to Fade Out a little change. PropertyName:Opacity Change the Value:0

That's works. enjoy.

0

精彩评论

暂无评论...
验证码 换一张
取 消