Esempio n. 1
0
 internal void RaiseAutomationEvents(double extentX, double extentY, double viewportX, double viewportY, double offsetX, double offsetY)
 {
     if (ScrollViewerAutomationPeer.AutomationIsScrollable(extentX, viewportX) != ((IScrollProvider)this).HorizontallyScrollable)
     {
         base.RaisePropertyChangedEvent(ScrollPatternIdentifiers.HorizontallyScrollableProperty, ScrollViewerAutomationPeer.AutomationIsScrollable(extentX, viewportX), ((IScrollProvider)this).HorizontallyScrollable);
     }
     if (ScrollViewerAutomationPeer.AutomationIsScrollable(extentY, viewportY) != ((IScrollProvider)this).VerticallyScrollable)
     {
         base.RaisePropertyChangedEvent(ScrollPatternIdentifiers.VerticallyScrollableProperty, ScrollViewerAutomationPeer.AutomationIsScrollable(extentY, viewportY), ((IScrollProvider)this).VerticallyScrollable);
     }
     if (ScrollViewerAutomationPeer.AutomationGetViewSize(extentX, viewportX) != ((IScrollProvider)this).HorizontalViewSize)
     {
         base.RaisePropertyChangedEvent(ScrollPatternIdentifiers.HorizontalViewSizeProperty, ScrollViewerAutomationPeer.AutomationGetViewSize(extentX, viewportX), ((IScrollProvider)this).HorizontalViewSize);
     }
     if (ScrollViewerAutomationPeer.AutomationGetViewSize(extentY, viewportY) != ((IScrollProvider)this).VerticalViewSize)
     {
         base.RaisePropertyChangedEvent(ScrollPatternIdentifiers.VerticalViewSizeProperty, ScrollViewerAutomationPeer.AutomationGetViewSize(extentY, viewportY), ((IScrollProvider)this).VerticalViewSize);
     }
     if (ScrollViewerAutomationPeer.AutomationGetScrollPercent(extentX, viewportX, offsetX) != ((IScrollProvider)this).HorizontalScrollPercent)
     {
         base.RaisePropertyChangedEvent(ScrollPatternIdentifiers.HorizontalScrollPercentProperty, ScrollViewerAutomationPeer.AutomationGetScrollPercent(extentX, viewportX, offsetX), ((IScrollProvider)this).HorizontalScrollPercent);
     }
     if (ScrollViewerAutomationPeer.AutomationGetScrollPercent(extentY, viewportY, offsetY) != ((IScrollProvider)this).VerticalScrollPercent)
     {
         base.RaisePropertyChangedEvent(ScrollPatternIdentifiers.VerticalScrollPercentProperty, ScrollViewerAutomationPeer.AutomationGetScrollPercent(extentY, viewportY, offsetY), ((IScrollProvider)this).VerticalScrollPercent);
     }
 }
Esempio n. 2
0
 // Token: 0x060027E2 RID: 10210 RVA: 0x000BAF87 File Offset: 0x000B9187
 private static double AutomationGetScrollPercent(double extent, double viewport, double actualOffset)
 {
     if (!ScrollViewerAutomationPeer.AutomationIsScrollable(extent, viewport))
     {
         return(-1.0);
     }
     return(actualOffset * 100.0 / (extent - viewport));
 }