static void MarkerBrushChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is SearchReplacePanel) { SearchReplacePanel panel = (SearchReplacePanel)d; panel._renderer.MarkerBrush = (Brush)e.NewValue; } }
static void SearchPatternChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is SearchReplacePanel) { SearchReplacePanel panel = (SearchReplacePanel)d; panel.ValidateSearchText(); panel.UpdateSearch(); } }
/// <summary> /// Creates a SearchReplacePanel and installs it to the TextArea. /// </summary> public static SearchReplacePanel Install(TextArea textArea) { if (textArea == null) { throw new ArgumentNullException(nameof(textArea)); } var panel = new SearchReplacePanel { _textArea = textArea }; panel.AttachInternal(textArea); panel._handler = new SearchReplaceInputHandler(textArea, panel); textArea.DefaultInputHandler.NestedInputHandlers.Add(panel._handler); return(panel); }
public SearchReplacePanelAdorner(TextArea textArea, SearchReplacePanel panel) : base(textArea) { _panel = panel; AddVisualChild(panel); }
internal SearchReplaceInputHandler(TextArea textArea, SearchReplacePanel panel) : base(textArea) { RegisterCommands(); _panel = panel; }