private void TagInputBox_Input(object sender, TagInputEventArgs e) { suggestedTags.Notification = String.Empty; try { if (tagInput.IsEmpty) { suggestedTags.Highlighter = new TextSplitter(); } else { IEnumerable <string> tags = tagInput.Tags; if (e.TagInputComplete) { _model.PageTags.AddAll(from t in tags where !_model.PageTags.ContainsKey(t) select new SimpleTagButtonModel(t)); tagInput.Clear(); } suggestedTags.Highlighter = new TextSplitter(tagInput.Tags); } } catch (Exception ex) { TraceLogger.Log(TraceCategory.Error(), "Processing Tag input failed with {0}", ex); TraceLogger.ShowGenericErrorBox(Properties.Resources.TagEditor_Input_Error, ex); } e.Handled = true; }
private void TagInputBox_Input(object sender, TagInputEventArgs e) { if (!e.TagInputComplete) { tagsPanel.Highlighter = new TextSplitter(tagInput.Tags); } }
private void Button_Click(object sender, RoutedEventArgs e) { HitHighlightedTagButtonModel mdl = DataContext as HitHighlightedTagButtonModel; var args = new TagInputEventArgs(SingleTagInputEvent, this, new string[] { mdl.TagName }, null); args.TagInputComplete = true; RaiseEvent(args); }
private void Button_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) { HitHighlightedTagButtonModel mdl = DataContext as HitHighlightedTagButtonModel; var args = new TagInputEventArgs(SingleTagInputEvent, this, new string[] { mdl.TagName }, e); // Only keyboard entries which trigger an action get through if (args.Action != TagInputEventArgs.TaggingAction.None) { args.TagInputComplete = true; RaiseEvent(args); } }
private void TagInputBox_Input(object sender, TagInputEventArgs e) { if (e.TagInputComplete) { NewTagButton_Click(sender, e); } else { suggestedTags.Highlighter = new TextSplitter(tagInput.Tags); e.Handled = true; } }