Window.Current Property


Gets the window of the current thread.

Equivalent WinUI property: Microsoft.UI.Xaml.Window.Current.

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

Property Value


The currently activated window.


The value of this property depends on the thread from which it is called. If called from a UI thread, the value is the Window instance for that thread. On any other thread, the value is null.

Applies to