skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class Padding

Represents the padding values around an element in a layout.

Inheritance
System.Object
Padding
Namespace: Telerik.Windows.Documents.Layout
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public sealed class Padding : ValueType

Constructors

Padding(Int32)

Declaration
public Padding(int all)
Parameters
System.Int32 all

Padding(Int32, Int32, Int32, Int32)

Declaration
public Padding(int left, int top, int right, int bottom)
Parameters
System.Int32 left

System.Int32 top

System.Int32 right

System.Int32 bottom

Padding(Padding)

Declaration
public Padding(Padding other)
Parameters
Padding other

Fields

Empty

Declaration
public static readonly Padding Empty
Field Value
Padding

Properties

All

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

Declaration
public int All { get; set; }
Property Value
System.Int32

Bottom

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

Declaration
public int Bottom { get; set; }
Property Value
System.Int32

Horizontal

Gets or sets the horizontal padding value.

Declaration
public int Horizontal { get; }
Property Value
System.Int32

Left

Gets or sets the left padding value.

Declaration
public int Left { get; set; }
Property Value
System.Int32

Right

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

Declaration
public int Right { get; set; }
Property Value
System.Int32

Size

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

Declaration
public Size Size { get; }
Property Value
System.Windows.Size

Top

Gets or sets the top padding value.

Declaration
public int Top { get; set; }
Property Value
System.Int32

Vertical

Represents the vertical padding in the layout for Telerik documents.

Declaration
public int Vertical { get; }
Property Value
System.Int32

Methods

Add(Padding, Padding)

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

Declaration
public static Padding Add(Padding padding1, Padding padding2)
Parameters
Padding padding1

The first Padding instance to be added.

Padding padding2

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
public override bool Equals(object other)
Parameters
System.Object other

The object to compare with the current Padding instance.

Returns
System.Boolean

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

GetHashCode()

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

Declaration
public override int GetHashCode()
Returns
System.Int32

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

Subtract(Padding, Padding)

Subtracts the specified Padding values and returns the resulting Padding.

Declaration
public static Padding Subtract(Padding padding1, Padding padding2)
Parameters
Padding padding1

The first Padding value to subtract from.

Padding padding2

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
public override string ToString()
Returns
System.String

A string that represents the current Padding object.

Operators

Addition(Padding, Padding)

Declaration
public static Padding operator +(Padding padding1, Padding padding2)
Parameters
Padding padding1

Padding padding2

Returns
Padding

Equality(Padding, Padding)

Declaration
public static bool operator ==(Padding padding1, Padding padding2)
Parameters
Padding padding1

Padding padding2

Returns
System.Boolean

Inequality(Padding, Padding)

Declaration
public static bool operator !=(Padding padding1, Padding padding2)
Parameters
Padding padding1

Padding padding2

Returns
System.Boolean

Subtraction(Padding, Padding)

Declaration
public static Padding operator -(Padding padding1, Padding padding2)
Parameters
Padding padding1

Padding padding2

Returns
Padding

Extension Methods

ExtensionMethods.ToThickness(Padding)
CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.