ThicknessHelper Class

Definition

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

public ref class ThicknessHelper 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.IThicknessHelperStatics, 65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class ThicknessHelper 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.IThicknessHelperStatics), 65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
public sealed class ThicknessHelper
Public NotInheritable Class ThicknessHelper
Inheritance
ThicknessHelper
Attributes
Windows.Foundation.Metadata.ContractVersionAttribute Windows.Foundation.Metadata.MarshalingBehaviorAttribute Windows.Foundation.Metadata.StaticAttribute Windows.Foundation.Metadata.ThreadingAttribute Windows.Foundation.Metadata.WebHostHiddenAttribute

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, Border.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

FromLengths(Double, Double, Double, Double)

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

FromUniformLength(Double)

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

Applies to

See also