Struct
Padding

Represents the padding values around an element in a layout.

Definition

Namespace:Telerik.Windows.Documents.Layout

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
[TypeConverter(typeof(PaddingConverter))]
public struct Padding

Constructors

Padding(Padding)

Declaration

cs-api-definition
public Padding(Padding other)

Parameters

other

Padding

Padding(int)

Declaration

cs-api-definition
public Padding(int all)

Parameters

all

int

Padding(int, int, int, int)

Declaration

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

Parameters

left

int

top

int

right

int

bottom

int

Fields

Empty

Declaration

cs-api-definition
public static readonly Padding Empty

Field Value

Padding

Properties

All

Represents the padding applied to all sides of a layout element.

Declaration

cs-api-definition
public int All { get; set; }

Property Value

int

Bottom

Gets or sets the bottom padding value of the layout element.

Declaration

cs-api-definition
public int Bottom { get; set; }

Property Value

int

Horizontal

Gets or sets the horizontal padding value.

Declaration

cs-api-definition
[Browsable(false)]
public int Horizontal { get; }

Property Value

int

Left

Gets or sets the left padding value.

Declaration

cs-api-definition
public int Left { get; set; }

Property Value

int

Right

Gets or sets the right padding value of the layout element.

Declaration

cs-api-definition
public int Right { get; set; }

Property Value

int

Size

Represents the size of padding, defined by its width and height in the Telerik UI framework.

Declaration

cs-api-definition
[Browsable(false)]
public Size Size { get; }

Property Value

Size

Top

Gets or sets the top padding value.

Declaration

cs-api-definition
public int Top { get; set; }

Property Value

int

Vertical

Represents the vertical padding in the layout for Telerik documents.

Declaration

cs-api-definition
[Browsable(false)]
public int Vertical { get; }

Property Value

int

Methods

Add(Padding, Padding)

Combines two Padding instances into a single Padding instance by adding their respective values.

Declaration

cs-api-definition
public static Padding Add(Padding padding1, Padding padding2)

Parameters

padding1

Padding

The first Padding instance to be added.

padding2

Padding

The second Padding instance to be added.

Returns

Padding

A new Padding instance that represents the sum of the two specified Padding instances.

Equals(object)

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

Declaration

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

Parameters

other

object

The object to compare with the current Padding instance.

Returns

bool

True if the specified object is equal to the current Padding instance; otherwise, false.

Overrides ValueType.Equals(object)

GetHashCode()

Gets the hash code for the current instance of the Padding class.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code that is generated based on the properties of the Padding instance.

Overrides ValueType.GetHashCode()

Subtract(Padding, Padding)

Subtracts the specified Padding values and returns the resulting Padding.

Declaration

cs-api-definition
public static Padding Subtract(Padding padding1, Padding padding2)

Parameters

padding1

Padding

The first Padding value to subtract from.

padding2

Padding

The Padding value to subtract.

Returns

Padding

A new Padding that represents the result of the subtraction.

ToString()

Returns a string representation of the current Padding instance.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the current Padding object.

Overrides ValueType.ToString()

Operators

operator !=(Padding, Padding)

Declaration

cs-api-definition
public static bool operator !=(Padding padding1, Padding padding2)

Parameters

padding1

Padding

padding2

Padding

Returns

bool

operator +(Padding, Padding)

Declaration

cs-api-definition
public static Padding operator +(Padding padding1, Padding padding2)

Parameters

padding1

Padding

padding2

Padding

Returns

Padding

operator -(Padding, Padding)

Declaration

cs-api-definition
public static Padding operator -(Padding padding1, Padding padding2)

Parameters

padding1

Padding

padding2

Padding

Returns

Padding

operator ==(Padding, Padding)

Declaration

cs-api-definition
public static bool operator ==(Padding padding1, Padding padding2)

Parameters

padding1

Padding

padding2

Padding

Returns

bool

Extension Methods