New to Telerik Document ProcessingStart a free 30-day trial

Padding

Class

Immutable padding or margin values for the four sides of a rectangle in device-independent pixels.

Definition

Namespace:Telerik.Windows.Documents.Primitives

Assembly:Telerik.Windows.Documents.Core.dll

Syntax:

C#
public class Padding

Inheritance: objectPadding

Constructors

Initializes a new instance of the Padding class.

C#
public Padding(double left, double top, double right, double bottom)
Parameters:leftdouble

The left padding in device independent pixels (1/96 inch).

topdouble

The top padding in device independent pixels (1/96 inch).

rightdouble

The right padding in device independent pixels (1/96 inch).

bottomdouble

The bottom padding in device independent pixels (1/96 inch).

Initializes a new instance of the Padding class and sets all paddings to a given value.

C#
public Padding(double all)
Parameters:alldouble

The value in device independent pixels (1/96 inch).

Fields

An empty padding.

C#
public static readonly Padding Empty

Methods

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

Returns true if the specified object is equal to the current object; otherwise, false.

Overrides: object.Equals(object)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Return a comma-separated Left, Top, Right, Bottom representation of the Padding values.

C#
public override string ToString()
Returns:

string

A string that represents the current object.

Overrides: object.ToString()

Operators

Determines whether the specified paddings are different.

C#
public static bool operator !=(Padding a, Padding b)
Parameters:aPaddingbPaddingReturns:

bool

True if the paddings are different.

Determines whether the specified paddings are equal.

C#
public static bool operator ==(Padding a, Padding b)
Parameters:aPaddingbPaddingReturns:

bool

True if the paddings are equal.

Properties

Gets the bottom padding. The value is in device independent pixels (1/96 inch).

C#
public double Bottom { get; }
Property Value:

The bottom padding.

Gets the left padding. The value is in device independent pixels (1/96 inch).

C#
public double Left { get; }
Property Value:

The left padding.

Gets the right padding. The value is in device independent pixels (1/96 inch).

C#
public double Right { get; }
Property Value:

The right padding.

Gets the top padding. The value is in device independent pixels (1/96 inch).

C#
public double Top { get; }
Property Value:

The top padding.