mediaelement - Dispaly time current position media in TextBlock - Windows Phone 8.0 Silverlight -


i develop application in windows phone 8.0 silverlight play media mediaelement. so, want display time current position media in textblock during media playing, how do? thanks.

you can use dispatchertimer update textblock. this:

dispatchertimer timer = new dispatchertimer(); timer.interval = new timespan(0, 0, 1); timer.tick += timer_tick; timer.start(); 

to current position, in timer_tick function, use yourplayer.position.tostring():

void timer_tick(object sender, eventargs e)     {         textblock.text = yourplayer.position.tostring();     } 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -