c# - How can I close a video with MediaElement? -
i have mediaelement, , click of button, open video
<button x:name="videotour" click="videotour_click" grid.column="4" grid.columnspan="2" grid.row="0" borderbrush="{x:null}" style="{staticresource buttonstyle1}" verticalalignment="top" margin="0,14,0,0" foreground="#ff5acb2f" background="{x:null}"> <button.content> <image source="../assets/movie.png" width="40" height="40"/> </button.content> </button> <mediaelement x:name="playtour" visibility="collapsed" grid.row="1" grid.rowspan="2" grid.column="1" grid.columnspan="4" source="{binding urltour}" aretransportcontrolsenabled="true" width="260" height="250"/>
when video has opened, submit button close mediaelement video, , set visibility property collpased, how can do?
you can add new button , subscribe click event stop video
playtour.stop();
i think, can handle how determine visibility state buttons
Comments
Post a Comment