private async void Window_Deactivated(object sender, EventArgs e) { HideVideo(); await Task.Delay(1000); Player.BeginStop(Stopped); }