private static void MarkerBrushChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { SearchPanel panel = d as SearchPanel; if (panel != null) { panel.renderer.MarkerBrush = (Brush)e.NewValue; } }
private static void SearchPatternChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { SearchPanel panel = d as SearchPanel; if (panel != null) { panel.ValidateSearchText(); panel.UpdateSearch(); } }
/// <summary> /// Creates a SearchPanel and installs it to the TextArea. /// </summary> public static SearchPanel Install(TextArea textArea) { if (textArea == null) { throw new ArgumentNullException("textArea"); } SearchPanel panel = new SearchPanel(); panel.AttachInternal(textArea); panel.handler = new SearchInputHandler(textArea, panel); textArea.DefaultInputHandler.NestedInputHandlers.Add(panel.handler); return(panel); }
public SearchPanelAdorner(TextArea textArea, SearchPanel panel) : base(textArea) { this.panel = panel; AddVisualChild(panel); }
internal SearchInputHandler(TextArea textArea, SearchPanel panel) : base(textArea) { RegisterCommands(CommandBindings); this.panel = panel; }