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

java - OnDragListener Fires Several Times? -

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