1 type derived from PresentationSource
PresentationCore (1)
Core\CSharp\System\Windows\Interop\HwndSource.cs (1)
39public class HwndSource : PresentationSource, IDisposable, IWin32Window, IKeyboardInputSink
252 references to PresentationSource
PresentationCore (158)
Core\CSharp\MS\Internal\Automation\EventMap.cs (4)
278foreach (PresentationSource source in PresentationSource.CriticalCurrentSources) 297PresentationSource source = argsArray[0] as PresentationSource;
Core\CSharp\System\Windows\Automation\Peers\UIElement3DAutomationPeer.cs (2)
196PresentationSource presentationSource = PresentationSource.CriticalFromVisual(_owner);
Core\CSharp\System\Windows\Automation\Peers\UIElementAutomationPeer.cs (6)
204PresentationSource presentationSource = PresentationSource.CriticalFromVisual(_owner); 233PresentationSource presentationSource = PresentationSource.CriticalFromVisual(_owner); 518PresentationSource presentationSource = PresentationSource.CriticalFromVisual(_owner);
Core\CSharp\System\Windows\Diagnostics\VisualDiagnostics.cs (2)
163s_ActiveHwndSource = PresentationSource.FromDependencyObject(args.Parent) as System.Windows.Interop.HwndSource; 353(s_ActiveHwndSource != PresentationSource.FromDependencyObject(d));
Core\CSharp\System\Windows\DragDrop.cs (1)
1318private Point GetClientPointFromScreenPoint(long dragPoint, PresentationSource source)
Core\CSharp\System\Windows\Input\AccessKeyManager.cs (6)
430(scope is PresentationSource) && (Keyboard.Modifiers & ModifierKeys.Alt) != ModifierKeys.Alt) 521private PresentationSource GetSourceForElement(IInputElement element) 523PresentationSource source = null; 535source = PresentationSource.CriticalFromVisual(containingVisual); 552private PresentationSource GetActiveSource() 565private PresentationSource CriticalGetActiveSource()
Core\CSharp\System\Windows\Input\Command\CommandDevice.cs (1)
58public override PresentationSource ActiveSource
Core\CSharp\System\Windows\Input\FocusManager.cs (2)
162if (PresentationSource.CriticalFromVisual(focusScope) != PresentationSource.CriticalFromVisual(focusedElement))
Core\CSharp\System\Windows\Input\InputDevice.cs (1)
30public abstract PresentationSource ActiveSource { get; }
Core\CSharp\System\Windows\Input\InputElement.cs (2)
313HwndSource sourceFrom = PresentationSource.CriticalFromVisual(rootFrom) as HwndSource; 314HwndSource sourceTo = PresentationSource.CriticalFromVisual(rootTo) as HwndSource;
Core\CSharp\System\Windows\Input\InputManager.cs (2)
485public void PushMenuMode(PresentationSource menuSite) 509public void PopMenuMode(PresentationSource menuSite)
Core\CSharp\System\Windows\Input\InputMethod.cs (2)
1757PresentationSource source = PresentationSource.CriticalFromVisual(containingVisual);
Core\CSharp\System\Windows\Input\InputReport.cs (4)
44protected InputReport(PresentationSource inputSource, InputType type, InputMode mode, int timestamp) 51_inputSource= new SecurityCriticalData<PresentationSource>(inputSource); 65public PresentationSource InputSource 125private SecurityCriticalData<PresentationSource> _inputSource;
Core\CSharp\System\Windows\Input\Keyboard.cs (2)
438PresentationSource presentationSource = PresentationSource.CriticalFromVisual(uie);
Core\CSharp\System\Windows\Input\KeyboardDevice.cs (8)
101public override PresentationSource ActiveSource 212PresentationSource source = PresentationSource.CriticalFromVisual(containingVisual); 679PresentationSource presentationSource = null; 683presentationSource = PresentationSource.CriticalFromVisual(visualContainer); 788_activeSource = new SecurityCriticalDataClass<PresentationSource>(keyboardInput.InputSource); 795_activeSource = new SecurityCriticalDataClass<PresentationSource>(keyboardInput.InputSource); 1148private SecurityCriticalDataClass<PresentationSource> _activeSource;
Core\CSharp\System\Windows\Input\KeyEventArgs.cs (4)
34public KeyEventArgs(KeyboardDevice keyboard, PresentationSource inputSource, int timestamp, Key key) : base(keyboard, timestamp) 61public PresentationSource InputSource 211internal PresentationSource UnsafeInputSource 240private PresentationSource _inputSource;
Core\CSharp\System\Windows\Input\ManipulationDevice.cs (3)
42_activeSource = PresentationSource.CriticalFromVisual(element); 75public override PresentationSource ActiveSource 605private PresentationSource _activeSource;
Core\CSharp\System\Windows\Input\ManipulationLogic.cs (2)
630PresentationSource presentationSource = PresentationSource.CriticalFromVisual((Visual)newContainer);
Core\CSharp\System\Windows\Input\Mouse.cs (2)
482PresentationSource inputSource = PresentationSource.FromDependencyObject(InputElement.GetContainingVisual(relativeTo as DependencyObject));
Core\CSharp\System\Windows\Input\MouseDevice.cs (21)
141PresentationSource activeSource = CriticalActiveSource; 175PresentationSource activeSource = CriticalActiveSource; 196protected Point GetClientPosition(PresentationSource presentationSource) 232public override PresentationSource ActiveSource 252internal PresentationSource CriticalActiveSource 421PresentationSource captureSource = PresentationSource.CriticalFromVisual(containingVisual); 638PresentationSource relativePresentationSource = null; 647relativePresentationSource = PresentationSource.CriticalFromVisual(containingVisual); 886PresentationSource presentationSource = PresentationSource.CriticalFromVisual(visual); 978PresentationSource activeSource = CriticalActiveSource; 1531_inputSource = new SecurityCriticalDataClass<PresentationSource>(rawMouseInputReport.InputSource); 1539_inputSource = new SecurityCriticalDataClass<PresentationSource>(rawMouseInputReport.InputSource); 2161internal static IInputElement GlobalHitTest(bool clientUnits, Point pt, PresentationSource inputSource) 2170internal static IInputElement GlobalHitTest(Point ptClient, PresentationSource inputSource) 2183private static void GlobalHitTest(bool clientUnits, Point pt, PresentationSource inputSource, out IInputElement enabledHit, out IInputElement originalHit) 2230internal static IInputElement LocalHitTest(bool clientUnits, Point pt, PresentationSource inputSource) 2239internal static IInputElement LocalHitTest(Point ptClient, PresentationSource inputSource) 2251private static void LocalHitTest(bool clientUnits, Point pt, PresentationSource inputSource, out IInputElement enabledHit, out IInputElement originalHit) 2378private SecurityCriticalDataClass<PresentationSource> _inputSource;
Core\CSharp\System\Windows\Input\RawAppCommandInputReport.cs (1)
47PresentationSource inputSource,
Core\CSharp\System\Windows\Input\RawKeyboardInputReport.cs (1)
58PresentationSource inputSource,
Core\CSharp\System\Windows\Input\RawMouseInputReport.cs (1)
58PresentationSource inputSource,
Core\CSharp\System\Windows\Input\RawTextInputReport.cs (1)
42PresentationSource inputSource,
Core\CSharp\System\Windows\Input\RawUIStateInputReport.cs (1)
40PresentationSource inputSource,
Core\CSharp\System\Windows\Input\TouchDevice.cs (7)
147public sealed override PresentationSource ActiveSource 163protected void SetActiveSource(PresentationSource activeSource) 312private static IInputElement GlobalHitTest(Point pt, PresentationSource inputSource) 317private static IInputElement LocalHitTest(Point pt, PresentationSource inputSource) 624PresentationSource presentationSource = PresentationSource.CriticalFromVisual(visual); 1425private PresentationSource _activeSource;
Core\CSharp\System\Windows\Interop\HwndKeyboardInputProvider.cs (3)
409HwndSource hwndSource = PresentationSource.CriticalFromVisual(focusedDO) as HwndSource; 541HwndSource hwndSource = PresentationSource.CriticalFromVisual(restoreFocusDO) as HwndSource; 564HwndSource hwndSource = PresentationSource.CriticalFromVisual(restoreFocusDO) as HwndSource;
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (2)
273HwndSource inputSource = PresentationSource.FromDependencyObject(containingVisual) as HwndSource; 1190PresentationSource source = _source.Value;
Core\CSharp\System\Windows\Interop\HwndSource.cs (4)
789foreach (PresentationSource source in PresentationSource.CriticalCurrentSources) 2398HwndSource mnemonicScope = (focusObject == null ? null : PresentationSource.CriticalFromVisual(focusObject) as HwndSource); 2733PresentationSource.CriticalFromVisual((DependencyObject)focusElement) != this)
Core\CSharp\System\Windows\Media\Visual.cs (4)
4787PresentationSource inputSource = PresentationSource.FromVisual(this); 4816PresentationSource inputSource = PresentationSource.FromVisual(this);
Core\CSharp\System\Windows\PresentationSource.cs (32)
110public static PresentationSource FromVisual(Visual visual) 130public static PresentationSource FromDependencyObject(DependencyObject dependencyObject) 504PresentationSource oldSource = null; 521newRoot.SetValue(RootSourceProperty, new SecurityCriticalDataForMultipleGetAndSet<PresentationSource>(this)); 559PresentationSource testSource = CriticalGetPresentationSourceFromElement(element,CachedSourceProperty); 640internal static PresentationSource CriticalFromVisual(DependencyObject v) 655internal static PresentationSource CriticalFromVisual(DependencyObject v, bool enable2DTo3DTransition) 662PresentationSource source = FindSource(v, enable2DTo3DTransition); 679PresentationSource ps = (PresentationSource)arg; 700PresentationSource baseSource = CriticalFromVisual(visuals[0]); 705PresentationSource currentSource = CriticalFromVisual(visuals[i]); 759private static PresentationSource CriticalGetPresentationSourceFromElement(DependencyObject dObject,DependencyProperty dp) 761PresentationSource testSource; 762SecurityCriticalDataForMultipleGetAndSet<PresentationSource> tempCriticalDataWrapper = 763(SecurityCriticalDataForMultipleGetAndSet < PresentationSource > ) 785SecurityCriticalDataForMultipleGetAndSet<PresentationSource>(PresentationSource.FindSource(element))); 809private static PresentationSource FindSource(DependencyObject o) 823private static PresentationSource FindSource(DependencyObject o, bool enable2DTo3DTransition) 825PresentationSource source = null; 850PresentationSource realSource = FindSource(doTarget); 851PresentationSource cachedSource = CriticalGetPresentationSourceFromElement(doTarget, CachedSourceProperty); 854doTarget.SetValue(CachedSourceProperty, new SecurityCriticalDataForMultipleGetAndSet<PresentationSource>(realSource)); 895= DependencyProperty.RegisterAttached("RootSource", typeof(SecurityCriticalDataForMultipleGetAndSet<PresentationSource>), typeof(PresentationSource), 896new PropertyMetadata((SecurityCriticalDataForMultipleGetAndSet<PresentationSource>)null)); 907= DependencyProperty.RegisterAttached("CachedSource", typeof(SecurityCriticalDataForMultipleGetAndSet<PresentationSource>), typeof(PresentationSource), 908new PropertyMetadata((SecurityCriticalDataForMultipleGetAndSet<PresentationSource>)null)); 911private static readonly DependencyProperty GetsSourceChangedEventProperty = DependencyProperty.RegisterAttached("IsBeingWatched", typeof(bool), typeof(PresentationSource), new PropertyMetadata((bool)false)); 916private static readonly RoutedEvent SourceChangedEvent = EventManager.RegisterRoutedEvent("SourceChanged", RoutingStrategy.Direct, typeof(SourceChangedEventHandler), typeof(PresentationSource));
Core\CSharp\System\Windows\SourceChangedEventArgs.cs (10)
30public SourceChangedEventArgs(PresentationSource oldSource, 31PresentationSource newSource) 58public SourceChangedEventArgs(PresentationSource oldSource, 59PresentationSource newSource, 63_oldSource = new SecurityCriticalData<PresentationSource>(oldSource); 64_newSource = new SecurityCriticalData<PresentationSource>(newSource); 80public PresentationSource OldSource 101public PresentationSource NewSource 146private SecurityCriticalData<PresentationSource> _oldSource; 151private SecurityCriticalData<PresentationSource> _newSource;
Core\CSharp\System\Windows\UIElement.cs (3)
1604PresentationSource.OnVisualAncestorChanged(uie, e); 3917PresentationSource presentationSource = PresentationSource.CriticalFromVisual(this);
Core\CSharp\System\Windows\UIElement3D.cs (3)
299PresentationSource.OnVisualAncestorChanged(uie3D, e); 1111PresentationSource presentationSource = PresentationSource.CriticalFromVisual(this);
Shared\MS\Internal\PointUtil.cs (7)
39public static Point ClientToRoot(Point point, PresentationSource presentationSource) 46public static Point TryClientToRoot(Point point, PresentationSource presentationSource, bool throwOnError, out bool success) 77public static Point RootToClient(Point point, PresentationSource presentationSource) 182public static Point ClientToScreen(Point pointClient, PresentationSource presentationSource) 209internal static Point ScreenToClient(Point pointScreen, PresentationSource presentationSource) 249internal static Rect ElementToRoot(Rect rectElement, Visual element, PresentationSource presentationSource) 278internal static Rect RootToClient(Rect rectRoot, PresentationSource presentationSource)
Shared\MS\Internal\SafeSecurityHelperAvalon.cs (1)
57isConnected = PresentationSource.CriticalFromVisual(visual ) != null;
PresentationFramework (92)
src\Framework\MS\Internal\Annotations\Component\AnnotationComponentManager.cs (1)
182if (PresentationSource.FromVisual(annotatedElement) == null)
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (1)
305HwndSource hwndSource = PresentationSource.CriticalFromVisual(findToolBar) as HwndSource;
src\Framework\System\Windows\Automation\Peers\DocumentAutomationPeer.cs (2)
152HwndSource hwndSource = PresentationSource.CriticalFromVisual(uiScope) as HwndSource; 179HwndSource hwndSource = PresentationSource.CriticalFromVisual(uiScope) as HwndSource;
src\Framework\System\Windows\Automation\Peers\TextElementAutomationPeer.cs (4)
72PresentationSource presentationSource = PresentationSource.CriticalFromVisual(textView.RenderScope); 120PresentationSource presentationSource = PresentationSource.CriticalFromVisual(textView.RenderScope);
src\Framework\System\Windows\Controls\ComboBox.cs (1)
1951HwndSource source = PresentationSource.CriticalFromVisual(itemsHost) as HwndSource;
src\Framework\System\Windows\Controls\Menu.cs (5)
272System.Windows.Interop.HwndSource source = PresentationSource.CriticalFromVisual(this) as System.Windows.Interop.HwndSource; 371PresentationSource source = sender as PresentationSource; 372PresentationSource mySource = null; 374mySource = PresentationSource.CriticalFromVisual(this);
src\Framework\System\Windows\Controls\PopupControlService.cs (3)
85PresentationSource source = PresentationSource.CriticalFromVisual((DependencyObject)directlyOver); 950return PresentationSource.CriticalFromVisual(uie) == null;
src\Framework\System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (1)
112if (!PresentationSource.UnderSamePresentationSource(e.OriginalSource as DependencyObject, this))
src\Framework\System\Windows\Controls\Primitives\MenuBase.cs (3)
916_pushedMenuMode = PresentationSource.CriticalFromVisual(this); 934PresentationSource pushedMenuMode = _pushedMenuMode; 968private PresentationSource _pushedMenuMode;
src\Framework\System\Windows\Controls\Primitives\Popup.cs (2)
3594private static PresentationSource GetPresentationSource(Visual visual) 3596return (visual != null ? PresentationSource.CriticalFromVisual(visual) : null);
src\Framework\System\Windows\Controls\ScrollViewer.cs (1)
1703if (!PresentationSource.UnderSamePresentationSource(e.OriginalSource as DependencyObject, this))
src\Framework\System\Windows\Controls\TextAdaptor.cs (4)
383PresentationSource presentationSource = PresentationSource.CriticalFromVisual(visual); 424PresentationSource presentationSource = PresentationSource.CriticalFromVisual(visual);
src\Framework\System\Windows\Controls\WebBrowser.cs (2)
1032PresentationSource pSource = PresentationSource.CriticalFromVisual(this);
src\Framework\System\windows\Documents\CaretElement.cs (4)
987PresentationSource source = PresentationSource.CriticalFromVisual(this); 1096PresentationSource source = null; 1097source = PresentationSource.CriticalFromVisual(this);
src\Framework\System\Windows\Documents\ImmComposition.cs (5)
103HwndSource source = PresentationSource.CriticalFromVisual(scope) as HwndSource; 143PresentationSource.RemoveSourceChangedHandler(UiScope, new SourceChangedEventHandler(OnSourceChanged)); 172PresentationSource.RemoveSourceChangedHandler(UiScope, new SourceChangedEventHandler(OnSourceChanged)); 180PresentationSource.AddSourceChangedHandler(UiScope, new SourceChangedEventHandler(OnSourceChanged)); 346PresentationSource.RemoveSourceChangedHandler(UiScope, new SourceChangedEventHandler(OnSourceChanged));
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (2)
314PresentationSource source = PresentationSource.CriticalFromVisual(This.UiScope);
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (2)
688PresentationSource source = null; 690source = PresentationSource.CriticalFromVisual(_textEditor.UiScope);
src\Framework\System\windows\Documents\TextEditorTyping.cs (3)
514PresentationSource.AddSourceChangedHandler(element, OnSourceChanged); 524PresentationSource.RemoveSourceChangedHandler(element, OnSourceChanged); 1644IWin32Window win32Window = PresentationSource.CriticalFromVisual(This.UiScope) as IWin32Window;
src\Framework\System\Windows\Documents\TextStore.cs (10)
811PresentationSource source; 887PresentationSource source; 1004PresentationSource source; 2477private void GetVisualInfo(out PresentationSource source, out IWin32Window win32Window, out ITextView view) 2479source = PresentationSource.CriticalFromVisual(RenderScope); 2496private static UnsafeNativeMethods.RECT TransformRootRectToScreenCoordinates(Point milPointTopLeft, Point milPointBottomRight, IWin32Window win32Window, PresentationSource source) 2735PresentationSource source = null; 2737source = PresentationSource.CriticalFromVisual((Visual)RenderScope); 3228win32Window = PresentationSource.CriticalFromVisual(RenderScope) as IWin32Window; 3232win32Window = PresentationSource.FromVisual(RenderScope) as IWin32Window;
src\Framework\System\Windows\FrameworkContentElement.cs (1)
720if (dp != null && dp.OwnerType == typeof(PresentationSource) && dp.Name == "RootSource")
src\Framework\System\Windows\FrameworkElement.cs (1)
2082if (dp != null && dp.OwnerType == typeof(PresentationSource) && dp.Name == "RootSource")
src\Framework\System\Windows\Generated\FrameworkContentElement.cs (1)
445PresentationSource.OnAncestorChanged(this);
src\Framework\System\Windows\Input\KeyboardNavigation.cs (6)
171PresentationSource source = PresentationSource.CriticalFromVisual(d); 1169IKeyboardInputSink inputSink = PresentationSource.CriticalFromVisual(visual) as IKeyboardInputSink; 3382PresentationSource source = null; 3387source = (eventSourceVisual != null) ? PresentationSource.CriticalFromVisual(eventSourceVisual) : null; 3511PresentationSource source;
src\Framework\System\Windows\Interop\HwndHost.cs (14)
455PresentationSource source = null; 459source = PresentationSource.CriticalFromVisual(this, false /* enable2DTo3DTransition */); 512private NativeMethods.RECT CalculateAssignedRC(PresentationSource source) 634PresentationSource.RemoveSourceChangedHandler(this, new SourceChangedEventHandler(OnSourceChanged)); 704PresentationSource source = PresentationSource.CriticalFromVisual(this, false /* enable2DTo3DTransition */); 1001PresentationSource.AddSourceChangedHandler(this, new SourceChangedEventHandler(OnSourceChanged)); 1055IKeyboardInputSink source = PresentationSource.CriticalFromVisual(this, false /* enable2DTo3DTransition */) as IKeyboardInputSink; 1156PresentationSource source = PresentationSource.CriticalFromVisual(this, false /* enable2DTo3DTransition */); 1169PresentationSource goingThrough3DSource = PresentationSource.CriticalFromVisual(this, true /* enable2DTo3DTransition */); 1292PresentationSource source = PresentationSource.CriticalFromVisual(this, false /* enable2DTo3DTransition */);
src\Framework\System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
578case 486: t = () => typeof(PresentationSource); break;
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
7903typeof(System.Windows.PresentationSource),
src\Framework\System\Windows\Markup\KnownTypes.cs (1)
6030case KnownElements.PresentationSource: t = typeof(System.Windows.PresentationSource); break;
src\Framework\System\Windows\SystemResources.cs (4)
1312PresentationSource source = (PresentationSource)argsArray[0]; 1399foreach (PresentationSource source in PresentationSource.CriticalCurrentSources)
src\Framework\System\Windows\VisualStateManager.cs (2)
349controlInTree = (PresentationSource.CriticalFromVisual(control) != null); 357stateGroupsRootInTree = (PresentationSource.CriticalFromVisual(stateGroupsRoot) != null);
src\Framework\System\Windows\Window.cs (1)
7380if (!PresentationSource.UnderSamePresentationSource(e.OriginalSource as DependencyObject, this))
src\Shared\MS\Internal\SafeSecurityHelper.cs (2)
134PresentationSource source = PresentationSource.CriticalFromVisual(relativeTo);
src\Shared\MS\Internal\SafeSecurityHelperAvalon.cs (1)
57isConnected = PresentationSource.CriticalFromVisual(visual ) != null;
System.Activities.Presentation (2)
System.Activities.Presentation\System\Activities\Presentation\View\ViewUtilities.cs (2)
247PresentationSource source = PresentationSource.FromDependencyObject(visual);