Show / Hide Table of Contents

Method CenterOnScreen

| Edit this page View Source

CenterOnScreen(Window, double?, double?)

Centers the window on the current monitor

Declaration
public static void CenterOnScreen(this Window window, double? width = null, double? height = null)
Parameters
Type Name Description
Window window

Window

double? width

Width of the window in device independent pixels, or null if keeping the current size

double? height

Height of the window in device independent pixels, or null if keeping the current size

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX