共用方式為


PresentationSource.FromVisual(Visual) 方法

定義

傳回會顯示所提供 Visual 的資源。

public:
 static System::Windows::PresentationSource ^ FromVisual(System::Windows::Media::Visual ^ visual);
[System.Security.SecurityCritical]
public static System.Windows.PresentationSource FromVisual (System.Windows.Media.Visual visual);
public static System.Windows.PresentationSource FromVisual (System.Windows.Media.Visual visual);
[<System.Security.SecurityCritical>]
static member FromVisual : System.Windows.Media.Visual -> System.Windows.PresentationSource
static member FromVisual : System.Windows.Media.Visual -> System.Windows.PresentationSource
Public Shared Function FromVisual (visual As Visual) As PresentationSource

參數

visual
Visual

要尋找資源的 Visual

傳回

PresentationSource

顯示視覺的 PresentationSource,如果 visual 已遭處置則為 null

屬性

例外狀況

visualnull

適用於