private void proceedSave_Click(object sender, RoutedEventArgs e) { //remove content from address box (as it's an annoying rich textbox control) TextRange textRange = new TextRange( // TextPointer to the start of content in the RichTextBox. this.addressText.Document.ContentStart, // TextPointer to the end of content in the RichTextBox. this.addressText.Document.ContentEnd ); db.insertPatientInformation(this.nameText.Text, this.dobText.Text, this.nationalityText.Text, Convert.ToInt32(this.nhsNoText.Text), textRange.Text, this.weightText.Text); //load windows for basic volume scanning procedure if (!existing) { OptionLoader windowOption = new OptionLoader(); windowOption.Owner = this; windowOption.Show(); } }