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 -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -