HwndSourceParameters.WindowStyle Property

Definition

Gets or sets the style for the window.

C#
public int WindowStyle { get; set; }

Property Value

The window style. See the CreateWindowEx function for a complete list of style bits. Defaults: WS_VISIBLE, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, WS_MAXIMIZEBOX, WS_CLIPCHILDREN.

Remarks

By default, the following bits are set when the structure is created: WS_VISIBLE; WS_CAPTION; WS_SYSMENU; WS_THICKFRAME; WS_MINIMIZEBOX; WS_MAXIMIZEBOX; WS_CLIPCHILDREN.

For a standard window, you must set the WS_CLIPCHILDREN bit. This style bit is enforced in the code itself; if you omit to set this flag, WPF adds it to whatever value you provide.

Applies to

Produit Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also