public void ChangeWindow(MessageWindow window) { _windowChanging = true; TextEditorInstance.Document.Text = window == null ? string.Empty : LocalizableString.ResolveNewLine(window.Message.Current); TextBoxInstance.Text = window == null ? string.Empty : LocalizableString.ResolveNewLine(window.Message.Original); TextEditorInstance.Document.UndoStack.ClearAll(); _windowChanging = false; }