public PlayerView() { InitializeComponent(); DispatcherTimer timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += timer_Tick; timer.Start(); string name = PlayerViewModel.GetURLFIlm(); string[] url = name.Split('\\'); if (name != "null") { if (url[0] == "") { mePlayer.Source = new Uri(Environment.CurrentDirectory + PlayerViewModel.GetURLFIlm()); } else { mePlayer.Source = new Uri(PlayerViewModel.GetURLFIlm()); } mePlayer.Play(); mediaPlayerIsPlaying = true; } }