Class
Padding

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:

cs-api-definition
public class Padding

Inheritance: objectPadding

Constructors

Padding(double)

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

Declaration

cs-api-definition
public Padding(double all)

Parameters

all

double

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

Padding(double, double, double, double)

Initializes a new instance of the Padding class.

Declaration

cs-api-definition
public Padding(double left, double top, double right, double bottom)

Parameters

left

double

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

top

double

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

right

double

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

bottom

double

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

Fields

Empty

An empty padding.

Declaration

cs-api-definition
public static readonly Padding Empty

Field Value

Padding

Properties

Bottom

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

Declaration

cs-api-definition
public double Bottom { get; }

Property Value

double

The bottom padding.

Left

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

Declaration

cs-api-definition
public double Left { get; }

Property Value

double

The left padding.

Right

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

Declaration

cs-api-definition
public double Right { get; }

Property Value

double

The right padding.

Top

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

Declaration

cs-api-definition
public double Top { get; }

Property Value

double

The top padding.

Methods

Equals(object)

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

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

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)

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

ToString()

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

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the current object.

Overrides object.ToString()

Operators

operator !=(Padding, Padding)

Determines whether the specified paddings are different.

Declaration

cs-api-definition
public static bool operator !=(Padding a, Padding b)

Parameters

a

Padding

b

Padding

Returns

bool

True if the paddings are different.

operator ==(Padding, Padding)

Determines whether the specified paddings are equal.

Declaration

cs-api-definition
public static bool operator ==(Padding a, Padding b)

Parameters

a

Padding

b

Padding

Returns

bool

True if the paddings are equal.