private void TextChanged(object sender, TextChangedEventArgs e) { if (!string.IsNullOrWhiteSpace(this.titleTextBox.Text) && !string.IsNullOrWhiteSpace(this.urlTextBox.Text)) { this.okButton.IsEnabled = WebBrowserMvvmHelper.VerifyUrlFormat(this.urlTextBox.Text); } else { // either both or neither textbox is empty this.okButton.IsEnabled = string.IsNullOrWhiteSpace(this.titleTextBox.Text) && string.IsNullOrWhiteSpace(this.urlTextBox.Text); } }
private bool CanProcessWebPage() { return(WebBrowserMvvmHelper.VerifyUrlFormat(this.UrlForTitle)); }