Exemple #1
0
        private static void MarkerBrushChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SearchPanel panel = d as SearchPanel;

            if (panel != null)
            {
                panel.renderer.MarkerBrush = (Brush)e.NewValue;
            }
        }
Exemple #2
0
        private static void SearchPatternChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SearchPanel panel = d as SearchPanel;

            if (panel != null)
            {
                panel.ValidateSearchText();
                panel.UpdateSearch();
            }
        }
Exemple #3
0
        /// <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);
        }
Exemple #4
0
 public SearchPanelAdorner(TextArea textArea, SearchPanel panel)
     : base(textArea)
 {
     this.panel = panel;
     AddVisualChild(panel);
 }
Exemple #5
0
 internal SearchInputHandler(TextArea textArea, SearchPanel panel)
     : base(textArea)
 {
     RegisterCommands(CommandBindings);
     this.panel = panel;
 }