Пример #1
0
        private static void MarkerBrushChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SearchPanel panel = d as SearchPanel;

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

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