ThicknessHelper ThicknessHelper ThicknessHelper Class

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

Syntax

Declaration

public sealed class ThicknessHelperpublic sealed class ThicknessHelperPublic NotInheritable Class ThicknessHelper

Remarks

Thickness is a Windows Runtime structure that represents a pixel measure applied to the outside (margin) or inside (padding) render dimensions of a rectangular UI element. For example, BorderThickness uses a Thickness value.

ThicknessHelper 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 Thickness 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 Thickness, for example the Top field value. For C++ developers, approximately the same utility features that a Microsoft Visual Basic developer could use directly on Thickness are available in a static form on the ThicknessHelper class.

Methods summary

Creates a Thickness value based on element values. C# and Microsoft Visual Basic code should use Thickness(Double,Double,Double,Double) instead.

Creates a new Thickness value using a uniform value for all the element values. C# and Microsoft Visual Basic code should use Thickness(Double) instead.

Methods

  • FromLengths(Double, Double, Double, Double)
    FromLengths(Double, Double, Double, Double)
    FromLengths(Double, Double, Double, Double)
    FromLengths(Double, Double, Double, Double)

    Creates a Thickness value based on element values. C# and Microsoft Visual Basic code should use Thickness(Double,Double,Double,Double) instead.

    public static Thickness FromLengths(Double left, Double top, Double right, Double bottom)public static Thickness FromLengths(Double left, Double top, Double right, Double bottom)Public Static Function FromLengths(left As Double, top As Double, right As Double, bottom As Double) As Thicknesspublic static Thickness FromLengths(Double left, Double top, Double right, Double bottom)

    Parameters

    • left
      System.Double
      System.Double
      System.Double

      The initial Left.

    • top
      System.Double
      System.Double
      System.Double

      The initial Top.

    • right
      System.Double
      System.Double
      System.Double

      The initial Right.

    • bottom
      System.Double
      System.Double
      System.Double

      The initial Bottom.

    Returns

  • FromUniformLength(Double)
    FromUniformLength(Double)
    FromUniformLength(Double)
    FromUniformLength(Double)

    Creates a new Thickness value using a uniform value for all the element values. C# and Microsoft Visual Basic code should use Thickness(Double) instead.

    public static Thickness FromUniformLength(Double uniformLength)public static Thickness FromUniformLength(Double uniformLength)Public Static Function FromUniformLength(uniformLength As Double) As Thicknesspublic static Thickness FromUniformLength(Double uniformLength)

    Parameters

    • uniformLength
      System.Double
      System.Double
      System.Double

      The uniform value to apply to all four of the Thickness element values.

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

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

Details

Assembly

Windows.UI.Xaml.dll