How to make a loop for a media element?
i have media element whos xaml code is:
<mediaelement height="9" autoplay="true" source="kalimba.mp3" name="mediaelement1" width="20" volume="0.9" />how loop, play again , again ever?
thanks in advance,
an inexperienced silverlight c# coder
don't know if there property there must event notify when media has completed playing. add handler event and play media again, in handler.
edit: following meant-
<mediaelement height="9" autoplay="true" source="kalimba.mp3" name="mediaelement1" width="20" volume="0.9" mediaended="mediaendedhandler"/>
here eventhandler.
void mediaendedhandler(object sender, routedeventargs args) { (sender as mediaelement).play(); // mediaelement1.play(); }
Silverlight > Programming Silverlight with .NET – General
Comments
Post a Comment