This is the situation.
I have a MainPage.Xaml, within this MainPage.Xaml I have embedded a UserControl (VideoWidget.Xaml) (LayouRoot.Children).
VideoWidget.Xaml has a mediaElement embedded in its LayoutRoot.
I'm trying to Pause/Play the MediaElement (mediaElement1) from MainPage.Xaml but does not respond.
e.g.
public MainPage()
{
// Required to initialize variables
InitializeComponent();
Video testVideo = new Video();
VideoWidget video = new VideoWidget(testVideo);
videoWidget.Height = 246;
videoWidget.Width = 290;
LayoutRoot.Children.Add(video);
video.mediaElement1.play();
}
The All methods for mediaElement are not responsive. Help please.
Mohit