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 jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder Design System Kit
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ExtensionMethods

Inheritance
System.Object
ExtensionMethods
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Layout
Assembly: Telerik.Windows.Documents.dll

Syntax

public static class ExtensionMethods

Methods

AddWidth(Size, Size)

Declaration
public static Size AddWidth(this Size size1, Size size2)
Parameters
System.Windows.Size size1

System.Windows.Size size2

Returns
System.Windows.Size

AreClose(RectangleF, RectangleF)

Declaration
public static bool AreClose(this RectangleF rect1, RectangleF rect2)
Parameters
RectangleF rect1

RectangleF rect2

Returns
System.Boolean

BlendWith(Color, Color)

Declaration
public static Color BlendWith(this Color color, Color backColor)
Parameters
System.Windows.Media.Color color

System.Windows.Media.Color backColor

Returns
System.Windows.Media.Color

Darker(Color)

Declaration
public static Color Darker(this Color color)
Parameters
System.Windows.Media.Color color

Returns
System.Windows.Media.Color

Darker(Color, Byte)

Declaration
public static Color Darker(this Color color, byte factor)
Parameters
System.Windows.Media.Color color

System.Byte factor

Returns
System.Windows.Media.Color

GetAssociatedLayoutBox(UIElement)

Declaration
public static LayoutBox GetAssociatedLayoutBox(this UIElement element)
Parameters
System.Windows.UIElement element

Returns
LayoutBox

GetCurrentSectionBox(LayoutBox)

Declaration
public static SectionLayoutBox GetCurrentSectionBox(this LayoutBox box)
Parameters
LayoutBox box

Returns
SectionLayoutBox

GetElement<T>(HierarchicalIndex, RadDocument)

Declaration
public static T GetElement<T>(this HierarchicalIndex index, RadDocument document)
    where T : DocumentElement
Parameters
HierarchicalIndex index

RadDocument document

Returns
T

Type Parameters
T

GetLocation(Rect)

Declaration
public static Point GetLocation(this Rect rect)
Parameters
System.Windows.Rect rect

Returns
System.Windows.Point

GetSize(Rect)

Declaration
public static Size GetSize(this Rect rect)
Parameters
System.Windows.Rect rect

Returns
System.Windows.Size

IntersectsWith(Rect, Rect)

Declaration
public static bool IntersectsWith(this Rect rect, Rect rect1)
Parameters
System.Windows.Rect rect

System.Windows.Rect rect1

Returns
System.Boolean

Lighter(Color)

Declaration
public static Color Lighter(this Color color)
Parameters
System.Windows.Media.Color color

Returns
System.Windows.Media.Color

Lighter(Color, Byte)

Declaration
public static Color Lighter(this Color color, byte factor)
Parameters
System.Windows.Media.Color color

System.Byte factor

Returns
System.Windows.Media.Color

LighterUsingHsl(Color)

Declaration
public static Color LighterUsingHsl(this Color color)
Parameters
System.Windows.Media.Color color

Returns
System.Windows.Media.Color

ProbeDequeue<T>(Queue<T>)

Declaration
public static T ProbeDequeue<T>(this Queue<T> queue)
Parameters
System.Collections.Generic.Queue<T> queue

Returns
T

Type Parameters
T

ProbePeek<T>(Stack<T>)

Declaration
public static T ProbePeek<T>(this Stack<T> stack)
Parameters
System.Collections.Generic.Stack<T> stack

Returns
T

Type Parameters
T

ProbePop<T>(Stack<T>)

Declaration
public static T ProbePop<T>(this Stack<T> stack)
Parameters
System.Collections.Generic.Stack<T> stack

Returns
T

Type Parameters
T

SetAssociatedLayoutBox(UIElement, LayoutBox)

Declaration
public static void SetAssociatedLayoutBox(this UIElement element, LayoutBox value)
Parameters
System.Windows.UIElement element

LayoutBox value

SetSource(BitmapImage, Stream)

Declaration
public static void SetSource(this BitmapImage bitmapImage, Stream imageStream)
Parameters
System.Windows.Media.Imaging.BitmapImage bitmapImage

System.IO.Stream imageStream

SetSourceEx(BitmapImage, Byte[], ref String)

Declaration
public static byte[] SetSourceEx(this BitmapImage bitmapImage, byte[] imageBytes, ref string extension)
Parameters
System.Windows.Media.Imaging.BitmapImage bitmapImage

System.Byte[] imageBytes

System.String extension

Returns
System.Byte[]

SetSourceEx(BitmapImage, Stream, ref String)

Declaration
public static Stream SetSourceEx(this BitmapImage bitmapImage, Stream imageStream, ref string extension)
Parameters
System.Windows.Media.Imaging.BitmapImage bitmapImage

System.IO.Stream imageStream

System.String extension

Returns
System.IO.Stream

Split(String, String)

Declaration
public static string[] Split(this string input, string separator)
Parameters
System.String input

System.String separator

Returns
System.String[]

ToPadding(Thickness)

Declaration
public static Padding ToPadding(this Thickness thickness)
Parameters
System.Windows.Thickness thickness

Returns
Padding

ToPoint(PointF)

Declaration
public static Point ToPoint(this PointF point)
Parameters
PointF point

Returns
System.Windows.Point

ToPointF(Point)

Declaration
public static PointF ToPointF(this Point point)
Parameters
System.Windows.Point point

Returns
PointF

ToRect(RectangleF)

Declaration
public static Rect ToRect(this RectangleF rectangle)
Parameters
RectangleF rectangle

Returns
System.Windows.Rect

ToRectangleF(Rect)

Declaration
public static RectangleF ToRectangleF(this Rect rectangle)
Parameters
System.Windows.Rect rectangle

Returns
RectangleF

ToSizeF(Size)

Declaration
public static SizeF ToSizeF(this Size size)
Parameters
System.Windows.Size size

Returns
SizeF

ToThickness(Padding)

Declaration
public static Thickness ToThickness(this Padding padding)
Parameters
Padding padding

Returns
System.Windows.Thickness

Was this article helpful?

Tell us how we can improve this article

Skip
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.