示例#1
0
        private static void FlowDocumentPageViewerZoomChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            //sender.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Loaded, new Action(() => { AdornerLayer.GetAdornerLayer((sender as HighlightAdorner).AdornedElement).Update(); }));
            FlowDocumentPageViewerHighlightHandler handler = sender as FlowDocumentPageViewerHighlightHandler;

            if (!handler.ignorePropertyChange)
            {
                handler.flowDocumentPageViewer.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Loaded, new Action(() => { UpdateHighlighting(handler.flowDocumentPageViewer, handler.scrollBarHighlightHandler); }));
            }
        }
示例#2
0
        private static void FlowDocumentPageViewerMasterPageNumberChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            FlowDocumentPageViewerHighlightHandler handler = sender as FlowDocumentPageViewerHighlightHandler;

            if (!handler.ignorePropertyChange)
            {
                //ClearHighlighting(handler.flowDocumentPageViewer);
                handler.ClearHighlighting();
                //do new search
                handler.flowDocumentPageViewer.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Loaded, new Action(() => { handler.OnNewSearchNeeded(); }));
            }
        }