SizeHelper class

Applies to Windows and Windows Phone

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

Inheritance

Object
  SizeHelper

Syntax


public sealed class SizeHelper

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The SizeHelper class has these types of members:

Methods

The SizeHelper class has these methods. It also inherits methods from the Object class.

MethodDescription
Equals(Size, Size) Provides comparison of the values of two Size values. C# and Microsoft Visual Basic code should use the = operator instead.
FromDimensions Creates a new Size based on width and height element values. C# and Microsoft Visual Basic code should use Size(Double,Double) instead.
GetIsEmpty Returns whether a specified Size is equivalent to an Empty Size. C# and Microsoft Visual Basic code should use IsEmpty instead.

 

Properties

The SizeHelper class has these properties.

PropertyAccess typeDescription

Empty

Read-onlyGets 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.

 

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 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 Visual Basic developer could use directly on Size are available in a static form on the SizeHelper class.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

Size

 

 

Show:
© 2014 Microsoft. All rights reserved.