private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     parentWindow = (MainWindow)MainWindow.GetWindow(this);
 }
        public async void Enemybeurt()
        {
            gevecht.beurt = Gevecht.Beurt.Enemy;
            BtnAttack.IsEnabled = false;
            int dmg = await gevecht.Enemybeurt();
            ToonBericht2(gevecht.vijand.Name + " doet "+ dmg +" damage!", true);
            playAnimation("attack", Enemy);
            gevecht.beurt = Gevecht.Beurt.Speler;
            NewLetters();
            BtnAttack.IsEnabled = true;
            //Check of speler dood is
            if (gevecht.speler.Levend == false)
            {
                // Doodgaan scherm
                ToonBericht("JE BENT DOOD!", true);
                var backgroundWorker = new BackgroundWorker();
                backgroundWorker.DoWork += (s, e) =>
                {
                    Thread.Sleep(5000);
                };
                backgroundWorker.RunWorkerCompleted += (s, e) =>
                {
                    parentWindow = (MainWindow)MainWindow.GetWindow(this);
                    parentWindow.Doodgaanscherm();

                };

                backgroundWorker.RunWorkerAsync();
            }
            else
            {
                RefreshData();
            }
        }