src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PointUtil.cs (7)
36public static Point ClientToRoot(Point point, PresentationSource presentationSource)
42public static Point TryClientToRoot(Point point, PresentationSource presentationSource, bool throwOnError, out bool success)
68public static Point RootToClient(Point point, PresentationSource presentationSource)
167public static Point ClientToScreen(Point pointClient, PresentationSource presentationSource)
189internal static Point ScreenToClient(Point pointScreen, PresentationSource presentationSource)
224internal static Rect ElementToRoot(Rect rectElement, Visual element, PresentationSource presentationSource)
248internal static Rect RootToClient(Rect rectRoot, PresentationSource presentationSource)
System\Windows\Input\MouseDevice.cs (19)
130PresentationSource activeSource = CriticalActiveSource;
157PresentationSource activeSource = CriticalActiveSource;
178protected Point GetClientPosition(PresentationSource presentationSource)
210public override PresentationSource ActiveSource => _inputSource;
215internal PresentationSource CriticalActiveSource => _inputSource;
366PresentationSource captureSource = PresentationSource.CriticalFromVisual(containingVisual);
564PresentationSource relativePresentationSource = null;
573relativePresentationSource = PresentationSource.CriticalFromVisual(containingVisual);
807PresentationSource presentationSource = PresentationSource.CriticalFromVisual(visual);
893PresentationSource activeSource = CriticalActiveSource;
2054internal static IInputElement GlobalHitTest(bool clientUnits, Point pt, PresentationSource inputSource)
2063internal static IInputElement GlobalHitTest(Point ptClient, PresentationSource inputSource)
2071private static void GlobalHitTest(bool clientUnits, Point pt, PresentationSource inputSource, out IInputElement enabledHit, out IInputElement originalHit)
2109internal static IInputElement LocalHitTest(bool clientUnits, Point pt, PresentationSource inputSource)
2118internal static IInputElement LocalHitTest(Point ptClient, PresentationSource inputSource)
2125private static void LocalHitTest(bool clientUnits, Point pt, PresentationSource inputSource, out IInputElement enabledHit, out IInputElement originalHit)
2244private PresentationSource _inputSource;
System\Windows\PresentationSource.cs (29)
90public static PresentationSource FromVisual(Visual visual)
104public static PresentationSource FromDependencyObject(DependencyObject dependencyObject)
429PresentationSource oldSource = null;
439oldSource = (PresentationSource)oldRoot.GetValue(RootSourceProperty);
484PresentationSource testSource = (PresentationSource)element.GetValue(CachedSourceProperty);
554internal static PresentationSource CriticalFromVisual(DependencyObject v)
564internal static PresentationSource CriticalFromVisual(DependencyObject v, bool enable2DTo3DTransition)
568PresentationSource source = FindSource(v, enable2DTo3DTransition);
585PresentationSource ps = (PresentationSource)arg;
604PresentationSource baseSource = CriticalFromVisual(visuals[0]);
609PresentationSource currentSource = CriticalFromVisual(visuals[i]);
658element.SetValue(CachedSourceProperty, PresentationSource.FindSource(element));
673private static PresentationSource FindSource(DependencyObject o)
683private static PresentationSource FindSource(DependencyObject o, bool enable2DTo3DTransition)
685PresentationSource source = null;
694source = (PresentationSource)v.GetValue(RootSourceProperty);
705PresentationSource realSource = FindSource(doTarget);
706PresentationSource cachedSource = (PresentationSource)doTarget.GetValue(CachedSourceProperty);
750= DependencyProperty.RegisterAttached("RootSource", typeof(PresentationSource), typeof(PresentationSource),
751new PropertyMetadata((PresentationSource)null));
758= DependencyProperty.RegisterAttached("CachedSource", typeof(PresentationSource), typeof(PresentationSource),
759new PropertyMetadata((PresentationSource)null));
762private static readonly DependencyProperty GetsSourceChangedEventProperty = DependencyProperty.RegisterAttached("IsBeingWatched", typeof(bool), typeof(PresentationSource), new PropertyMetadata((bool)false));
767private static readonly RoutedEvent SourceChangedEvent = EventManager.RegisterRoutedEvent("SourceChanged", RoutingStrategy.Direct, typeof(SourceChangedEventHandler), typeof(PresentationSource));