SizeHelper SizeHelper SizeHelper Class

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

Syntax

Declaration

public sealed class SizeHelperpublic sealed class SizeHelperPublic NotInheritable Class SizeHelper

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 summary

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.

Methods summary

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

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

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

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

    Property Value

Methods

  • Equals(Windows.Foundation.Size,Windows.Foundation.Size)
    Equals(Windows.Foundation.Size,Windows.Foundation.Size)
    Equals(Windows.Foundation.Size,Windows.Foundation.Size)
    Equals(Windows.Foundation.Size,Windows.Foundation.Size)

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

    public static bool Equals(Windows.Foundation.Size target,Windows.Foundation.Size value)public static bool Equals(Windows.Foundation.Size target,Windows.Foundation.Size value)Public Static Function Equals(target As Windows.Foundation.Size,value As Windows.Foundation.Size) As bool

    Parameters

    Returns

    • bool
      bool
      bool

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

  • FromDimensions(System.Single,System.Single)
    FromDimensions(System.Single,System.Single)
    FromDimensions(System.Single,System.Single)
    FromDimensions(System.Single,System.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(System.Single width,System.Single height)public static Size FromDimensions(System.Single width,System.Single height)Public Static Function FromDimensions(width As System.Single,height As System.Single) As Size

    Parameters

    • width
      System.Single
      System.Single
      System.Single

      The initial Width.

    • height
      System.Single
      System.Single
      System.Single

      The initial Height.

    Returns

  • GetIsEmpty(Windows.Foundation.Size)
    GetIsEmpty(Windows.Foundation.Size)
    GetIsEmpty(Windows.Foundation.Size)
    GetIsEmpty(Windows.Foundation.Size)

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

    public static bool GetIsEmpty(Windows.Foundation.Size target)public static bool GetIsEmpty(Windows.Foundation.Size target)Public Static Function GetIsEmpty(target As Windows.Foundation.Size) As bool

    Parameters

    Returns

    • bool
      bool
      bool

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

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.UI.Xaml.dll