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> < ;/beginstoryboard> </EventTrigger> </MediaElement.Triggers> </mediaelem Ent>
WPF Learning Notes (2)--Animated effect buttons grow