示例#1
0
        public RedUnderlineAdorner(SpellTextBox textbox) : base(textbox)
        {
            sizeChangedEventHandler = new SizeChangedEventHandler(
                delegate
            {
                SignalInvalidate();
            });

            routedEventHandler = new RoutedEventHandler(
                delegate
            {
                SignalInvalidate();
            });

            scrollChangedEventHandler = new ScrollChangedEventHandler(
                delegate
            {
                SignalInvalidate();
            });

            textbox.SizeChanged += sizeChangedEventHandler;

            textbox.SpellcheckCompleted += routedEventHandler;

            textbox.AddHandler(ScrollViewer.ScrollChangedEvent, scrollChangedEventHandler);
        }
示例#2
0
 public SpellCheckerVM(SpellChecker kurdspell, SpellTextBox parent)
 {
     _spellChecker   = kurdspell;
     _box            = parent;
     Words           = new List <Word>();
     MisspelledWords = new ObservableCollection <Word>();
     IgnoredWords    = new List <Word>();
     SuggestedWords  = new ObservableCollection <Word>();
 }
示例#3
0
 void SignalInvalidate()
 {
     box = (SpellTextBox)this.AdornedElement;
     box.Dispatcher.BeginInvoke(DispatcherPriority.Background, (Action)InvalidateVisual);
 }