src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PointUtil.cs (7)
33public static Point ClientToRoot(Point point, PresentationSource presentationSource)
39public static Point TryClientToRoot(Point point, PresentationSource presentationSource, bool throwOnError, out bool success)
65public static Point RootToClient(Point point, PresentationSource presentationSource)
164public static Point ClientToScreen(Point pointClient, PresentationSource presentationSource)
186internal static Point ScreenToClient(Point pointScreen, PresentationSource presentationSource)
221internal static Rect ElementToRoot(Rect rectElement, Visual element, PresentationSource presentationSource)
245internal static Rect RootToClient(Rect rectRoot, PresentationSource presentationSource)
System\Windows\Input\MouseDevice.cs (19)
121PresentationSource activeSource = CriticalActiveSource;
148PresentationSource activeSource = CriticalActiveSource;
169protected Point GetClientPosition(PresentationSource presentationSource)
201public override PresentationSource ActiveSource => _inputSource;
206internal PresentationSource CriticalActiveSource => _inputSource;
357PresentationSource captureSource = PresentationSource.CriticalFromVisual(containingVisual);
555PresentationSource relativePresentationSource = null;
564relativePresentationSource = PresentationSource.CriticalFromVisual(containingVisual);
798PresentationSource presentationSource = PresentationSource.CriticalFromVisual(visual);
884PresentationSource activeSource = CriticalActiveSource;
2045internal static IInputElement GlobalHitTest(bool clientUnits, Point pt, PresentationSource inputSource)
2054internal static IInputElement GlobalHitTest(Point ptClient, PresentationSource inputSource)
2062private static void GlobalHitTest(bool clientUnits, Point pt, PresentationSource inputSource, out IInputElement enabledHit, out IInputElement originalHit)
2100internal static IInputElement LocalHitTest(bool clientUnits, Point pt, PresentationSource inputSource)
2109internal static IInputElement LocalHitTest(Point ptClient, PresentationSource inputSource)
2116private static void LocalHitTest(bool clientUnits, Point pt, PresentationSource inputSource, out IInputElement enabledHit, out IInputElement originalHit)
2235private PresentationSource _inputSource;
System\Windows\PresentationSource.cs (29)
80public static PresentationSource FromVisual(Visual visual)
94public static PresentationSource FromDependencyObject(DependencyObject dependencyObject)
419PresentationSource oldSource = null;
429oldSource = (PresentationSource)oldRoot.GetValue(RootSourceProperty);
474PresentationSource testSource = (PresentationSource)element.GetValue(CachedSourceProperty);
544internal static PresentationSource CriticalFromVisual(DependencyObject v)
554internal static PresentationSource CriticalFromVisual(DependencyObject v, bool enable2DTo3DTransition)
558PresentationSource source = FindSource(v, enable2DTo3DTransition);
575PresentationSource ps = (PresentationSource)arg;
594PresentationSource baseSource = CriticalFromVisual(visuals[0]);
599PresentationSource currentSource = CriticalFromVisual(visuals[i]);
648element.SetValue(CachedSourceProperty, PresentationSource.FindSource(element));
663private static PresentationSource FindSource(DependencyObject o)
673private static PresentationSource FindSource(DependencyObject o, bool enable2DTo3DTransition)
675PresentationSource source = null;
684source = (PresentationSource)v.GetValue(RootSourceProperty);
695PresentationSource realSource = FindSource(doTarget);
696PresentationSource cachedSource = (PresentationSource)doTarget.GetValue(CachedSourceProperty);
740= DependencyProperty.RegisterAttached("RootSource", typeof(PresentationSource), typeof(PresentationSource),
741new PropertyMetadata((PresentationSource)null));
748= DependencyProperty.RegisterAttached("CachedSource", typeof(PresentationSource), typeof(PresentationSource),
749new PropertyMetadata((PresentationSource)null));
752private static readonly DependencyProperty GetsSourceChangedEventProperty = DependencyProperty.RegisterAttached("IsBeingWatched", typeof(bool), typeof(PresentationSource), new PropertyMetadata((bool)false));
757private static readonly RoutedEvent SourceChangedEvent = EventManager.RegisterRoutedEvent("SourceChanged", RoutingStrategy.Direct, typeof(SourceChangedEventHandler), typeof(PresentationSource));