Size Constructor
Collapse the table of content
Expand the table of content

Size Constructor

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the Size structure and assigns it an initial width and height.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

public Size(
	double width,
	double height
)

Parameters

width
Type: System.Double
The initial width of the instance of Size.
height
Type: System.Double
The initial height of the instance of Size.

ExceptionCondition
ArgumentException

width or height are less than 0.

width and height values cannot be negative.

Although the type of the property values of a Size is Double, you generally should use integer values.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft