Beispiel #1
0
        /// <summary>
        /// Text Changed Handler
        /// </summary>
        /// <param name="target"></param>
        /// <param name="args"></param>
        private void OnTextChanged(object target, TextContainerChangedEventArgs args)
        {
            // Invalidate cache
            breakPositions = null;
            // spellPositions = null;

            // Actually do the refresh the next time they call Break, rather
            // than us doing it now.
            // BreakText(navigator.TextContainer.Start, navigator.TextContainer.End, false, out breakPositions);

            // At some point, it might be good to do something with
            // args.Start, args.SymbolsAdded, and args.SymbolsRemoved to only
            // update the cache as needed rather than recomputing all
            // breaks.
        }
Beispiel #2
0
 // this exists to solely to prevent "error CS0067: Warning as Error: The event 'MS.Internal.AutomationProxies.TextContainer.TextChanged' is never used"
 private void BogusFunctionToAvoidWarning(object target, TextContainerChangedEventArgs args)
 {
     TextChanged += new TextContainerChangedEventHandler(BogusFunctionToAvoidWarning);
 }