开发者

windows phone app how to intergrate video player using only c# code

in my application i want to navigate from a page which is extending Canvas to the video player for video player page i hav created one class and i m doing this there

 MediaElement videoPlayer = new MediaElement();
 videoPlayer.S开发者_如何转开发ource = (new Uri("some video url", UriKind.Absolute));
 videoPlayer.AutoPlay = true;
 videoPlayer.Play();

but when i m going to that page nothing is happning can some body tell me what i m missing. i am new to windows development. thanks is advance


You need to insert the MediaElement into your VisualTree. For example, if your canvas' name is LayoutRoot (the default), you could to this:

LayoutRoot.Children.Add(videoPlayer);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜