PresentationSource::FromVisual Method (Visual^)
.NET Framework (current version)
Returns the source in which a provided Visual is presented.
Assembly: PresentationCore (in PresentationCore.dll)
public: [SecurityCriticalAttribute] static PresentationSource^ FromVisual( Visual^ visual )
Parameters
- visual
-
Type:
System.Windows.Media::Visual^
The Visual to find the source for.
Return Value
Type: System.Windows::PresentationSource^The PresentationSource in which the visual is being presented, or null if visual is disposed.
| Exception | Condition |
|---|---|
| ArgumentNullException | visual is null. |
UIPermission
to call or implement this method. Associated enumeration: UIPermissionWindow::AllWindows.
.NET Framework
Available since 3.0
Available since 3.0
Show: