WPF Learning Notes (2)--Animated effect buttons grow

Source: Internet
Author: User

Description (2017-6-12-11:26:48):

1. The video tutorial is a button click, slowly become longer:

Note several aspects:

(1) routedevent= "Button.Click", where the button is used, is the property name, not the name name button1.

(2) These things should be written in pairs of tags, such as this is <BUTTON></BUTTON>, if it is a single kind of label, can be split into pairs, such as the following my own <MediaElement/> itself is a separate label, Can be manually split into <MediaElement><MediaElement/> This format, the animation code is written inside.

(3) Duration value inside to be written "0:0:2" This format of time, only write "2" is no effect.

2. Your own code:

<mediaelement height="168"Horizontalalignment=" Left"margin="40,12,0,0"Name="Myvideo"Verticalalignment="Top"Width="336"Mediaopened="myvideo_mediaopened"Source="E:\AppServ\www\github\MyWork\trunk\VideoToAudio\VideoToAudio\bin\Debug\LoveStory.mp4"> <MediaElement.Triggers> <eventtrigger routedevent="mediaelement.mediaended"> <BeginStoryboard> <Storyboard> <d Oubleanimation storyboard.targetproperty="Height"From="171"to="0"duration="0:0:2"> </DoubleAnimation> </Storyboard> &lt ;/beginstoryboard> </EventTrigger> </MediaElement.Triggers> </mediaelem Ent>

WPF Learning Notes (2)--Animated effect buttons grow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.