Class LayoutUtils
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Layouts
Assembly: Telerik.WinControls.dll
Syntax
public class LayoutUtils
Constructors
LayoutUtils()
Declaration
public LayoutUtils()
Fields
AnyBottom
Declaration
public const ContentAlignment AnyBottom
Field Value
System.Drawing.ContentAlignment
|
AnyCenter
Declaration
public const ContentAlignment AnyCenter
Field Value
System.Drawing.ContentAlignment
|
AnyLeft
Declaration
public const ContentAlignment AnyLeft
Field Value
System.Drawing.ContentAlignment
|
AnyMiddle
Declaration
public const ContentAlignment AnyMiddle
Field Value
System.Drawing.ContentAlignment
|
AnyRight
Declaration
public const ContentAlignment AnyRight
Field Value
System.Drawing.ContentAlignment
|
AnyTop
Declaration
public const ContentAlignment AnyTop
Field Value
System.Drawing.ContentAlignment
|
HorizontalAnchorStyles
Declaration
public const AnchorStyles HorizontalAnchorStyles
Field Value
System.Windows.Forms.AnchorStyles
|
InfinitySize
Declaration
public static readonly SizeF InfinitySize
Field Value
System.Drawing.SizeF
|
InvalidBounds
Declaration
public static Rectangle InvalidBounds
Field Value
System.Drawing.Rectangle
|
InvalidPadding
Declaration
public static Padding InvalidPadding
Field Value
System.Windows.Forms.Padding
|
InvalidSize
Declaration
public static Size InvalidSize
Field Value
System.Drawing.Size
|
MaxRectangle
Declaration
public static readonly Rectangle MaxRectangle
Field Value
System.Drawing.Rectangle
|
MaxSize
Declaration
public static readonly Size MaxSize
Field Value
System.Drawing.Size
|
MaxSizeF
Declaration
public static readonly SizeF MaxSizeF
Field Value
System.Drawing.SizeF
|
TestString
Declaration
public static readonly string TestString
Field Value
System.String
|
VerticalAnchorStyles
Declaration
public const AnchorStyles VerticalAnchorStyles
Field Value
System.Windows.Forms.AnchorStyles
|
Methods
AddAlignedRegion(Size, Size, TextImageRelation)
Declaration
public static Size AddAlignedRegion(Size textSize, Size imageSize, TextImageRelation relation)
Parameters
System.Drawing.Size
textSize
|
System.Drawing.Size
imageSize
|
System.Windows.Forms.TextImageRelation
relation
|
Returns
System.Drawing.Size
|
AddAlignedRegion(SizeF, SizeF, TextImageRelation)
Declaration
public static SizeF AddAlignedRegion(SizeF textSize, SizeF imageSize, TextImageRelation relation)
Parameters
System.Drawing.SizeF
textSize
|
System.Drawing.SizeF
imageSize
|
System.Windows.Forms.TextImageRelation
relation
|
Returns
System.Drawing.SizeF
|
AddAlignedRegionCore(Size, Size, Boolean)
Declaration
public static Size AddAlignedRegionCore(Size currentSize, Size contentSize, bool vertical)
Parameters
System.Drawing.Size
currentSize
|
System.Drawing.Size
contentSize
|
System.Boolean
vertical
|
Returns
System.Drawing.Size
|
AddAlignedRegionCore(SizeF, SizeF, Boolean)
Declaration
public static SizeF AddAlignedRegionCore(SizeF currentSize, SizeF contentSize, bool vertical)
Parameters
System.Drawing.SizeF
currentSize
|
System.Drawing.SizeF
contentSize
|
System.Boolean
vertical
|
Returns
System.Drawing.SizeF
|
Align(Size, Rectangle, ContentAlignment)
Declaration
public static Rectangle Align(Size alignThis, Rectangle withinThis, ContentAlignment align)
Parameters
System.Drawing.Size
alignThis
|
System.Drawing.Rectangle
withinThis
|
System.Drawing.ContentAlignment
align
|
Returns
System.Drawing.Rectangle
|
Align(Size, Rectangle, AnchorStyles)
Declaration
public static Rectangle Align(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles)
Parameters
System.Drawing.Size
alignThis
|
System.Drawing.Rectangle
withinThis
|
System.Windows.Forms.AnchorStyles
anchorStyles
|
Returns
System.Drawing.Rectangle
|
Align(SizeF, RectangleF, ContentAlignment)
Declaration
public static RectangleF Align(SizeF alignThis, RectangleF withinThis, ContentAlignment align)
Parameters
System.Drawing.SizeF
alignThis
|
System.Drawing.RectangleF
withinThis
|
System.Drawing.ContentAlignment
align
|
Returns
System.Drawing.RectangleF
|
Align(SizeF, RectangleF, AnchorStyles)
Declaration
public static RectangleF Align(SizeF alignThis, RectangleF withinThis, AnchorStyles anchorStyles)
Parameters
System.Drawing.SizeF
alignThis
|
System.Drawing.RectangleF
withinThis
|
System.Windows.Forms.AnchorStyles
anchorStyles
|
Returns
System.Drawing.RectangleF
|
AlignAndStretch(Size, Rectangle, AnchorStyles)
Declaration
public static Rectangle AlignAndStretch(Size fitThis, Rectangle withinThis, AnchorStyles anchorStyles)
Parameters
System.Drawing.Size
fitThis
|
System.Drawing.Rectangle
withinThis
|
System.Windows.Forms.AnchorStyles
anchorStyles
|
Returns
System.Drawing.Rectangle
|
AreWidthAndHeightLarger(Size, Size)
Declaration
public static bool AreWidthAndHeightLarger(Size size1, Size size2)
Parameters
System.Drawing.Size
size1
|
System.Drawing.Size
size2
|
Returns
System.Boolean
|
ClampNegativePaddingToZero(Padding)
Declaration
public static Padding ClampNegativePaddingToZero(Padding padding)
Parameters
System.Windows.Forms.Padding
padding
|
Returns
System.Windows.Forms.Padding
|
ContentAlignmentToIndex(ContentAlignment)
Declaration
public static int ContentAlignmentToIndex(ContentAlignment alignment)
Parameters
System.Drawing.ContentAlignment
alignment
|
Returns
System.Int32
|
ConvertZeroToUnbounded(Size)
Declaration
public static Size ConvertZeroToUnbounded(Size size)
Parameters
System.Drawing.Size
size
|
Returns
System.Drawing.Size
|
DeflateRect(Rectangle, Padding)
Declaration
public static Rectangle DeflateRect(Rectangle rect, Padding padding)
Parameters
System.Drawing.Rectangle
rect
|
System.Windows.Forms.Padding
padding
|
Returns
System.Drawing.Rectangle
|
DeflateRect(RectangleF, Padding)
Declaration
public static RectangleF DeflateRect(RectangleF rect, Padding padding)
Parameters
System.Drawing.RectangleF
rect
|
System.Windows.Forms.Padding
padding
|
Returns
System.Drawing.RectangleF
|
ExpandRegionsToFillBounds(Rectangle, AnchorStyles, ref Rectangle, ref Rectangle)
Declaration
public static void ExpandRegionsToFillBounds(Rectangle bounds, AnchorStyles region1Align, ref Rectangle region1, ref Rectangle region2)
Parameters
System.Drawing.Rectangle
bounds
|
System.Windows.Forms.AnchorStyles
region1Align
|
System.Drawing.Rectangle
region1
|
System.Drawing.Rectangle
region2
|
ExpandRegionsToFillBounds(RectangleF, AnchorStyles, ref RectangleF, ref RectangleF)
Declaration
public static void ExpandRegionsToFillBounds(RectangleF bounds, AnchorStyles region1Align, ref RectangleF region1, ref RectangleF region2)
Parameters
System.Drawing.RectangleF
bounds
|
System.Windows.Forms.AnchorStyles
region1Align
|
System.Drawing.RectangleF
region1
|
System.Drawing.RectangleF
region2
|
FlipPadding(Padding)
Declaration
public static Padding FlipPadding(Padding padding)
Parameters
System.Windows.Forms.Padding
padding
|
Returns
System.Windows.Forms.Padding
|
FlipPoint(Point)
Declaration
public static Point FlipPoint(Point point)
Parameters
System.Drawing.Point
point
|
Returns
System.Drawing.Point
|
FlipRectangle(Rectangle)
Declaration
public static Rectangle FlipRectangle(Rectangle rect)
Parameters
System.Drawing.Rectangle
rect
|
Returns
System.Drawing.Rectangle
|
FlipRectangleIf(Boolean, Rectangle)
Declaration
public static Rectangle FlipRectangleIf(bool condition, Rectangle rect)
Parameters
System.Boolean
condition
|
System.Drawing.Rectangle
rect
|
Returns
System.Drawing.Rectangle
|
FlipSize(Size)
Declaration
public static Size FlipSize(Size size)
Parameters
System.Drawing.Size
size
|
Returns
System.Drawing.Size
|
FlipSize(SizeF)
Declaration
public static SizeF FlipSize(SizeF size)
Parameters
System.Drawing.SizeF
size
|
Returns
System.Drawing.SizeF
|
FlipSizeIf(Boolean, Size)
Declaration
public static Size FlipSizeIf(bool condition, Size size)
Parameters
System.Boolean
condition
|
System.Drawing.Size
size
|
Returns
System.Drawing.Size
|
FlipSizeIf(Boolean, SizeF)
Declaration
public static SizeF FlipSizeIf(bool condition, SizeF size)
Parameters
System.Boolean
condition
|
System.Drawing.SizeF
size
|
Returns
System.Drawing.SizeF
|
GetDistance(Point, Point)
Declaration
public static double GetDistance(Point from, Point to)
Parameters
System.Drawing.Point
from
|
System.Drawing.Point
to
|
Returns
System.Double
|
GetOppositeTextImageRelation(TextImageRelation)
Declaration
public static TextImageRelation GetOppositeTextImageRelation(TextImageRelation relation)
Parameters
System.Windows.Forms.TextImageRelation
relation
|
Returns
System.Windows.Forms.TextImageRelation
|
HAlign(Size, Rectangle, ContentAlignment)
Declaration
public static Rectangle HAlign(Size alignThis, Rectangle withinThis, ContentAlignment align)
Parameters
System.Drawing.Size
alignThis
|
System.Drawing.Rectangle
withinThis
|
System.Drawing.ContentAlignment
align
|
Returns
System.Drawing.Rectangle
|
HAlign(Size, Rectangle, AnchorStyles)
Declaration
public static Rectangle HAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles)
Parameters
System.Drawing.Size
alignThis
|
System.Drawing.Rectangle
withinThis
|
System.Windows.Forms.AnchorStyles
anchorStyles
|
Returns
System.Drawing.Rectangle
|
HAlign(SizeF, RectangleF, ContentAlignment)
Declaration
public static RectangleF HAlign(SizeF alignThis, RectangleF withinThis, ContentAlignment align)
Parameters
System.Drawing.SizeF
alignThis
|
System.Drawing.RectangleF
withinThis
|
System.Drawing.ContentAlignment
align
|
Returns
System.Drawing.RectangleF
|
HAlign(SizeF, RectangleF, AnchorStyles)
Declaration
public static RectangleF HAlign(SizeF alignThis, RectangleF withinThis, AnchorStyles anchorStyles)
Parameters
System.Drawing.SizeF
alignThis
|
System.Drawing.RectangleF
withinThis
|
System.Windows.Forms.AnchorStyles
anchorStyles
|
Returns
System.Drawing.RectangleF
|
InflateRect(Rectangle, Padding)
Declaration
public static Rectangle InflateRect(Rectangle rect, Padding padding)
Parameters
System.Drawing.Rectangle
rect
|
System.Windows.Forms.Padding
padding
|
Returns
System.Drawing.Rectangle
|
IntersectSizes(Size, Size)
Declaration
public static Size IntersectSizes(Size a, Size b)
Parameters
System.Drawing.Size
a
|
System.Drawing.Size
b
|
Returns
System.Drawing.Size
|
IsBottomAlignment(ContentAlignment)
Declaration
public static bool IsBottomAlignment(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment
align
|
Returns
System.Boolean
|
IsCenterAlignment(ContentAlignment)
Declaration
public static bool IsCenterAlignment(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment
align
|
Returns
System.Boolean
|
IsHorizontalAlignment(ContentAlignment)
Declaration
public static bool IsHorizontalAlignment(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment
align
|
Returns
System.Boolean
|
IsHorizontalRelation(TextImageRelation)
Declaration
public static bool IsHorizontalRelation(TextImageRelation relation)
Parameters
System.Windows.Forms.TextImageRelation
relation
|
Returns
System.Boolean
|
IsIntersectHorizontally(Rectangle, Rectangle)
Declaration
public static bool IsIntersectHorizontally(Rectangle rect1, Rectangle rect2)
Parameters
System.Drawing.Rectangle
rect1
|
System.Drawing.Rectangle
rect2
|
Returns
System.Boolean
|
IsIntersectVertically(Rectangle, Rectangle)
Declaration
public static bool IsIntersectVertically(Rectangle rect1, Rectangle rect2)
Parameters
System.Drawing.Rectangle
rect1
|
System.Drawing.Rectangle
rect2
|
Returns
System.Boolean
|
IsLeftAlignment(ContentAlignment)
Declaration
public static bool IsLeftAlignment(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment
align
|
Returns
System.Boolean
|
IsMiddleAlignment(ContentAlignment)
Declaration
public static bool IsMiddleAlignment(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment
align
|
Returns
System.Boolean
|
IsRightAlignment(ContentAlignment)
Declaration
public static bool IsRightAlignment(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment
align
|
Returns
System.Boolean
|
IsTopAlignment(ContentAlignment)
Declaration
public static bool IsTopAlignment(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment
align
|
Returns
System.Boolean
|
IsVerticalAlignment(ContentAlignment)
Declaration
public static bool IsVerticalAlignment(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment
align
|
Returns
System.Boolean
|
IsVerticalRelation(TextImageRelation)
Declaration
public static bool IsVerticalRelation(TextImageRelation relation)
Parameters
System.Windows.Forms.TextImageRelation
relation
|
Returns
System.Boolean
|
IsZeroWidthOrHeight(Rectangle)
Declaration
public static bool IsZeroWidthOrHeight(Rectangle rectangle)
Parameters
System.Drawing.Rectangle
rectangle
|
Returns
System.Boolean
|
IsZeroWidthOrHeight(Size)
Declaration
public static bool IsZeroWidthOrHeight(Size size)
Parameters
System.Drawing.Size
size
|
Returns
System.Boolean
|
OldGetLargestStringSizeInCollection(Font, ICollection)
Declaration
public static Size OldGetLargestStringSizeInCollection(Font font, ICollection objects)
Parameters
System.Drawing.Font
font
|
System.Collections.ICollection
objects
|
Returns
System.Drawing.Size
|
RotateMargin(Padding, Int32)
Declaration
public static Padding RotateMargin(Padding margin, int angle)
Parameters
System.Windows.Forms.Padding
margin
|
System.Int32
angle
|
Returns
System.Windows.Forms.Padding
|
RTLTranslate(Rectangle, Rectangle)
Declaration
public static Rectangle RTLTranslate(Rectangle bounds, Rectangle withinBounds)
Parameters
System.Drawing.Rectangle
bounds
|
System.Drawing.Rectangle
withinBounds
|
Returns
System.Drawing.Rectangle
|
RTLTranslate(RectangleF, RectangleF)
Declaration
public static RectangleF RTLTranslate(RectangleF bounds, RectangleF withinBounds)
Parameters
System.Drawing.RectangleF
bounds
|
System.Drawing.RectangleF
withinBounds
|
Returns
System.Drawing.RectangleF
|
RTLTranslateNonRelative(Rectangle, Rectangle)
Declaration
public static Rectangle RTLTranslateNonRelative(Rectangle bounds, Rectangle withinBounds)
Parameters
System.Drawing.Rectangle
bounds
|
System.Drawing.Rectangle
withinBounds
|
Returns
System.Drawing.Rectangle
|
RTLTranslateNonRelative(RectangleF, RectangleF)
Declaration
public static RectangleF RTLTranslateNonRelative(RectangleF bounds, RectangleF withinBounds)
Parameters
System.Drawing.RectangleF
bounds
|
System.Drawing.RectangleF
withinBounds
|
Returns
System.Drawing.RectangleF
|
SplitRegion(Rectangle, Size, AnchorStyles, out Rectangle, out Rectangle)
Declaration
public static void SplitRegion(Rectangle bounds, Size specifiedContent, AnchorStyles region1Align, out Rectangle region1, out Rectangle region2)
Parameters
System.Drawing.Rectangle
bounds
|
System.Drawing.Size
specifiedContent
|
System.Windows.Forms.AnchorStyles
region1Align
|
System.Drawing.Rectangle
region1
|
System.Drawing.Rectangle
region2
|
SplitRegion(RectangleF, SizeF, AnchorStyles, out RectangleF, out RectangleF)
Declaration
public static void SplitRegion(RectangleF bounds, SizeF specifiedContent, AnchorStyles region1Align, out RectangleF region1, out RectangleF region2)
Parameters
System.Drawing.RectangleF
bounds
|
System.Drawing.SizeF
specifiedContent
|
System.Windows.Forms.AnchorStyles
region1Align
|
System.Drawing.RectangleF
region1
|
System.Drawing.RectangleF
region2
|
Stretch(Size, Size, AnchorStyles)
Declaration
public static Size Stretch(Size stretchThis, Size withinThis, AnchorStyles anchorStyles)
Parameters
System.Drawing.Size
stretchThis
|
System.Drawing.Size
withinThis
|
System.Windows.Forms.AnchorStyles
anchorStyles
|
Returns
System.Drawing.Size
|
SubAlignedRegion(Size, Size, TextImageRelation)
Declaration
public static Size SubAlignedRegion(Size currentSize, Size contentSize, TextImageRelation relation)
Parameters
System.Drawing.Size
currentSize
|
System.Drawing.Size
contentSize
|
System.Windows.Forms.TextImageRelation
relation
|
Returns
System.Drawing.Size
|
SubAlignedRegion(SizeF, SizeF, TextImageRelation)
Declaration
public static SizeF SubAlignedRegion(SizeF currentSize, SizeF contentSize, TextImageRelation relation)
Parameters
System.Drawing.SizeF
currentSize
|
System.Drawing.SizeF
contentSize
|
System.Windows.Forms.TextImageRelation
relation
|
Returns
System.Drawing.SizeF
|
SubAlignedRegionCore(Size, Size, Boolean)
Declaration
public static Size SubAlignedRegionCore(Size currentSize, Size contentSize, bool vertical)
Parameters
System.Drawing.Size
currentSize
|
System.Drawing.Size
contentSize
|
System.Boolean
vertical
|
Returns
System.Drawing.Size
|
SubAlignedRegionCore(SizeF, SizeF, Boolean)
Declaration
public static SizeF SubAlignedRegionCore(SizeF currentSize, SizeF contentSize, bool vertical)
Parameters
System.Drawing.SizeF
currentSize
|
System.Drawing.SizeF
contentSize
|
System.Boolean
vertical
|
Returns
System.Drawing.SizeF
|
UnionSizes(Size, Size)
Declaration
public static Size UnionSizes(Size a, Size b)
Parameters
System.Drawing.Size
a
|
System.Drawing.Size
b
|
Returns
System.Drawing.Size
|
UnionSizes(SizeF, SizeF)
Declaration
public static SizeF UnionSizes(SizeF a, SizeF b)
Parameters
System.Drawing.SizeF
a
|
System.Drawing.SizeF
b
|
Returns
System.Drawing.SizeF
|
VAlign(Size, Rectangle, ContentAlignment)
Declaration
public static Rectangle VAlign(Size alignThis, Rectangle withinThis, ContentAlignment align)
Parameters
System.Drawing.Size
alignThis
|
System.Drawing.Rectangle
withinThis
|
System.Drawing.ContentAlignment
align
|
Returns
System.Drawing.Rectangle
|
VAlign(Size, Rectangle, AnchorStyles)
Declaration
public static Rectangle VAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles)
Parameters
System.Drawing.Size
alignThis
|
System.Drawing.Rectangle
withinThis
|
System.Windows.Forms.AnchorStyles
anchorStyles
|
Returns
System.Drawing.Rectangle
|
VAlign(SizeF, RectangleF, ContentAlignment)
Declaration
public static RectangleF VAlign(SizeF alignThis, RectangleF withinThis, ContentAlignment align)
Parameters
System.Drawing.SizeF
alignThis
|
System.Drawing.RectangleF
withinThis
|
System.Drawing.ContentAlignment
align
|
Returns
System.Drawing.RectangleF
|
VAlign(SizeF, RectangleF, AnchorStyles)
Declaration
public static RectangleF VAlign(SizeF alignThis, RectangleF withinThis, AnchorStyles anchorStyles)
Parameters
System.Drawing.SizeF
alignThis
|
System.Drawing.RectangleF
withinThis
|
System.Windows.Forms.AnchorStyles
anchorStyles
|
Returns
System.Drawing.RectangleF
|