Skip to content

ElementExtensions.StartCenterOwner method

Sets the window to open centered on the owner window. The owner is provided when calling Show or ShowDialogAsync.

public static Window StartCenterOwner(this Window window)
parameter description
window Target window.

The window for chaining.

Do not call inside OnBuild - setting startup position after the window is shown throws an exception.

Sets: Window.StartupLocation