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

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -