I\'m struggling with the following issue:
I am building a WP8 application using the MVVM patern. I have a media element on my view.xaml and the logic to control this med
You can bind Media Element directly from the view model
in xaml:
in ViewModel:
private MediaElement _mediaElementObject;
public MediaElement MediaElementObject
{
get { return _mediaElementObject; }
set { _mediaElementObject = value;RaisePropertyChanged(); }
}
And on OnNavigatedTo
Override method you can create it's new object & can register it's events.
MediaElementObject=new MediaElement();
So that you can do all thing from the viewmodel itself.