private void btnStartTest_Click(object sender, RoutedEventArgs e) { List <string> wordstest = new List <string>(); Random rnd = new Random(); for (int i = 0; i < sliTestWordsNum.Value; i++) { wordstest.Add(test[rnd.Next(test.Count)]); } TestWindow twin = new TestWindow(wordstest); twin.Show(); //btnStartTest.IsEnabled = false; }