Window.Current 屬性

定義

取得目前線程的視窗。

public:
 static property Window ^ Current { Window ^ get(); };
static Window Current();
public static Window Current { get; }
var window = Window.current;
Public Shared ReadOnly Property Current As Window

屬性值

目前啟動的視窗。

備註

這個屬性的值取決於呼叫它的執行緒。 如果從 UI 執行緒呼叫,此值就是該執行緒的 Window 實例。 在任何其他執行緒上,此值為 null

適用於