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 ref class SizeHelper sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Microsoft.UI.Xaml.ISizeHelperStatics, 65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class SizeHelper final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Microsoft.UI.Xaml.ISizeHelperStatics), 65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
public sealed class SizeHelper
Public NotInheritable Class SizeHelper
Inheritance
SizeHelper
Attributes
Windows.Foundation.Metadata.ContractVersionAttribute Windows.Foundation.Metadata.MarshalingBehaviorAttribute Windows.Foundation.Metadata.StaticAttribute Windows.Foundation.Metadata.ThreadingAttribute Windows.Foundation.Metadata.WebHostHiddenAttribute

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

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

Methods

Equals(Size, Size)

Provides comparison of the values of two Size values. C# and Microsoft Visual Basic code should use the Equality (=) operator or Equals method instead.

FromDimensions(Single, Single)

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

GetIsEmpty(Size)

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

Applies to

See also