private void SaveBtn_Clicked(object source, RoutedEventArgs e) { if (newTestCaseName.Text != string.Empty && newTestCasePath.Text != string.Empty) { ITestCase testCase = new TestCase(newTestCaseName.Text, Document, newTestCasePath.Text); testCase.AddOption("DefaultExpanded", DefExpanded.IsChecked.ToString()); Page.TestCases.Add(testCase); Document.AddTestCase(testCase); } }