SizeHelper SizeHelper SizeHelper SizeHelper Class

Definition

Provides helper methods to evaluate or set Size values. C# and Microsoft Visual Basic code should use members of Size instead.

public : sealed class SizeHelper : ISizeHelperpublic sealed class SizeHelper : ISizeHelperPublic NotInheritable Class SizeHelper Implements ISizeHelper// This API is not available in Javascript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Size is a Windows Runtime structure that represents a rectangle's dimensions without an origin.

SizeHelper is one of several Helper classes that are intended to provide utility methods for Windows Runtime structure values. C# and Microsoft Visual Basic code can use members of Size instead, because utility members are available directly on the structure due to .NET Framework runtime support. C++ code can only access the data values on Size, for example Height. For C++ developers, approximately the same utility features that a Microsoft Visual Basic developer could use directly on Size are available in a static form on the SizeHelper class.

Properties

Empty Empty Empty Empty

Gets a static Size value where the Size has no height or width (all values 0). C# and Microsoft Visual Basic code should use Empty instead.

public : static Size Empty { get; }public static Size Empty { get; }Public Static ReadOnly Property Empty As Size// This API is not available in Javascript.
Value
Size Size Size Size

A Size with all values as 0.

Methods

Equals(Size, Size) Equals(Size, Size) Equals(Size, Size) Equals(Size, Size)

Provides comparison of the values of two Size values. C# and Microsoft Visual Basic code should use the = operator instead.

public : static PlatForm::Boolean Equals(Size target, Size value)public static bool Equals(Size target, Size value)Public Static Function Equals(target As Size, value As Size) As bool// This API is not available in Javascript.
Parameters
target
Size Size Size Size

The first Size to compare.

value
Size Size Size Size

The second Size to compare.

Returns
PlatForm::Boolean bool bool bool

true if target and value hold equivalent values; otherwise, false.

See Also

FromDimensions(Single, Single) FromDimensions(Single, Single) FromDimensions(Single, Single) FromDimensions(Single, Single)

Creates a new Size based on width and height element values. C# and Microsoft Visual Basic code should use Size(Double,Double) instead.

public : static Size FromDimensions(float width, float height)public static Size FromDimensions(Single width, Single height)Public Static Function FromDimensions(width As Single, height As Single) As Size// This API is not available in Javascript.
Parameters
width
float Single Single Single

The initial Width.

height
float Single Single Single

The initial Height.

Returns

The created Size.

GetIsEmpty(Size) GetIsEmpty(Size) GetIsEmpty(Size) GetIsEmpty(Size)

Returns whether a specified Size is equivalent to an Empty Size. C# and Microsoft Visual Basic code should use IsEmpty instead.

public : static PlatForm::Boolean GetIsEmpty(Size target)public static bool GetIsEmpty(Size target)Public Static Function GetIsEmpty(target As Size) As bool// This API is not available in Javascript.
Parameters
target
Size Size Size Size

The Size to evaluate.

Returns
PlatForm::Boolean bool bool bool

true if the specified Size is equivalent to an Empty Size; otherwise, false.

See Also