Class RadPageViewElementBase
Serves as the base element for all visual elements within RadPageView controls, providing common functionality for content orientation, layout management, and specialized painting with support for rotated content display.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadPageViewElementBase : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadPageViewElementBase()
Declaration
public RadPageViewElementBase()
Fields
BorderPaddingProperty
FillPaddingProperty
Properties
BorderAndFillOrientation
Gets the orientation used for border and fill painting operations, which may differ from content orientation to achieve proper visual appearance in rotated page view layouts.
Declaration
public PageViewContentOrientation BorderAndFillOrientation { get; }
Property Value
|
PageViewContentOrientation
|
BorderPadding
Gets or sets the padding that defines the offset of the border. This does not affect element's layout logic such as size and location but has only appearance impact.
Declaration
public Padding BorderPadding { get; set; }
Property Value
|
System.Windows.Forms.Padding
|
ContentOrientation
Gets the content orientation that determines how the element's content is rotated and displayed within the page view. This affects text and layout rendering orientation but not border and fill painting.
Declaration
public PageViewContentOrientation ContentOrientation { get; }
Property Value
|
PageViewContentOrientation
|
FillPadding
Gets or sets the padding that defines the offset of element's fill. This does not affect element's layout logic such as size and location but has only appearance impact.
Declaration
public Padding FillPadding { get; set; }
Property Value
|
System.Windows.Forms.Padding
|
Methods
ApplyClientOffset(SizeF)
Adds padding and border thickness to the provided measured size to account for the space occupied by borders and padding in the final element dimensions.
Declaration
protected SizeF ApplyClientOffset(SizeF measured)
Parameters
|
System.Drawing.SizeF
measured
The measured size before applying client offset adjustments. |
Returns
|
System.Drawing.SizeF
The adjusted size with padding and border thickness included. |
ApplyMinMaxSize(SizeF)
Applies minimum and maximum size constraints to the measured size, ensuring the final dimensions fall within the specified bounds defined by MinSize and MaxSize properties.
Declaration
protected SizeF ApplyMinMaxSize(SizeF measured)
Parameters
|
System.Drawing.SizeF
measured
The measured size before applying min/max constraints. |
Returns
|
System.Drawing.SizeF
The constrained size that respects the minimum and maximum size limitations. |
ApplyOrientationTransform(IGraphics, PageViewContentOrientation)
Applies rotation and translation transforms to the graphics context based on the specified orientation, enabling rotated rendering for vertical and flipped orientations.
Declaration
protected virtual object ApplyOrientationTransform(IGraphics graphics, PageViewContentOrientation orientation)
Parameters
|
IGraphics
graphics
The graphics context to transform. |
|
PageViewContentOrientation
orientation
The orientation that determines the transformation to apply. |
Returns
|
System.Object
The graphics state that can be used to restore the original transformation, or null if no transform was applied. |
ArrangeChildren(SizeF)
Arranges all child elements within the client rectangle derived from the final size, ensuring each child element is positioned within the available space.
Declaration
protected virtual void ArrangeChildren(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
The final size used to calculate the client rectangle for child arrangement. |
ArrangeContent(SizeF)
Arranges the element's content using the layout manager, with dimension swapping for vertical orientations to ensure proper content positioning in rotated coordinate systems.
Declaration
protected virtual void ArrangeContent(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
The final size available for content arrangement. |
ArrangeOverride(SizeF)
Arranges the element by positioning both child elements and content within the specified final size, coordinating the layout of all visual components within the element bounds.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
The final size allocated for the element arrangement. |
Returns
|
System.Drawing.SizeF
The actual size used for the arrangement, typically equal to the final size. |
Overrides
CalcLayoutOffset(PointF)
Calculates the layout offset by adding the element's location to the starting point, excluding margins since they are handled separately in the arrange rectangle calculations.
Declaration
protected override PointF CalcLayoutOffset(PointF startPoint)
Parameters
|
System.Drawing.PointF
startPoint
The starting point for layout calculations. |
Returns
|
System.Drawing.PointF
The adjusted layout offset point with the element's location applied. |
Overrides
CalculateMeasuredSize(SizeF, SizeF)
Calculates the final measured size by combining content size and child size requirements, taking the maximum width and height from both measurements to ensure all content fits properly.
Declaration
protected virtual SizeF CalculateMeasuredSize(SizeF contentSize, SizeF childSize)
Parameters
|
System.Drawing.SizeF
contentSize
The size required by the element's content. |
|
System.Drawing.SizeF
childSize
The size required by the element's child elements. |
Returns
|
System.Drawing.SizeF
The combined measured size that accommodates both content and children. |
CalculateRotationAndOffset(PageViewContentOrientation, ref Single, ref Single, ref Single)
Calculates the rotation angle and offset coordinates required to transform graphics rendering for the specified orientation, supporting 90, 180, and 270 degree rotations.
Declaration
protected virtual void CalculateRotationAndOffset(PageViewContentOrientation orientation, ref float angle, ref float offsetX, ref float offsetY)
Parameters
|
PageViewContentOrientation
orientation
The orientation that determines the transformation parameters. |
|
System.Single
angle
The rotation angle in degrees (output parameter). |
|
System.Single
offsetX
The X-axis offset for proper positioning after rotation (output parameter). |
|
System.Single
offsetY
The Y-axis offset for proper positioning after rotation (output parameter). |
CorrectFillAndBorderOrientation(IGraphics)
Applies the appropriate orientation transform for fill and border painting operations by delegating to ApplyOrientationTransform(IGraphics, PageViewContentOrientation) with the current border and fill orientation.
Declaration
protected virtual object CorrectFillAndBorderOrientation(IGraphics g)
Parameters
|
IGraphics
g
The graphics context to transform. |
Returns
|
System.Object
The graphics state that can be used to restore the original transformation. |
GetLightVisualElementSize(SizeF)
Gets the base light visual element size by calling the base class measurement logic, providing access to the standard element measurement without page view specific modifications.
Declaration
protected SizeF GetLightVisualElementSize(SizeF available)
Parameters
|
System.Drawing.SizeF
available
The available size for measurement. |
Returns
|
System.Drawing.SizeF
The measured size from the base LightVisualElement implementation. |
HitTest(Point)
Performs hit testing to determine if the specified point intersects with this element, with special handling for rotated elements using shape-based hit testing when a custom shape is defined.
Declaration
public override bool HitTest(Point point)
Parameters
|
System.Drawing.Point
point
The point to test for intersection with the element. |
Returns
|
System.Boolean
True if the point intersects with the element; otherwise, false. |
Overrides
InitializeFields()
Initializes the default field values for the page view element, including content orientation settings, image layout configuration, and layout policy bypassing for optimized performance.
Declaration
protected override void InitializeFields()
Overrides
MeasureContent(SizeF)
Measures the content size using the layout manager, with dimension swapping for vertical orientations to ensure proper measurement in rotated coordinate systems.
Declaration
protected virtual SizeF MeasureContent(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available size for content measurement. |
Returns
|
System.Drawing.SizeF
The measured size of the content as determined by the layout manager. |
MeasureOverride(SizeF)
Measures the element by calculating the desired size based on content and children, with special handling for vertical orientations where width and height dimensions are swapped in the final measurement.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available size for measuring the element. |
Returns
|
System.Drawing.SizeF
The desired size of the element, adjusted for content orientation if needed. |
Overrides
ModifyBorderAndFillPaintRect(RectangleF, Padding)
Modifies the border and fill paint rectangle by swapping dimensions for vertical orientations and applying the specified padding to create the final painting area.
Declaration
protected virtual RectangleF ModifyBorderAndFillPaintRect(RectangleF preferred, Padding padding)
Parameters
|
System.Drawing.RectangleF
preferred
The preferred rectangle for painting operations. |
|
System.Windows.Forms.Padding
padding
The padding to apply to the rectangle. |
Returns
|
System.Drawing.RectangleF
The modified rectangle adjusted for orientation and padding requirements. |
PaintBorder(IGraphics, Single, SizeF, RectangleF)
Paints the element's border by first modifying the paint rectangle according to border padding settings, then delegating to the base implementation for actual border rendering.
Declaration
protected override void PaintBorder(IGraphics graphics, float angle, SizeF scale, RectangleF rect)
Parameters
|
IGraphics
graphics
The graphics context for border painting. |
|
System.Single
angle
The rotation angle for border painting. |
|
System.Drawing.SizeF
scale
The scale factor for border painting. |
|
System.Drawing.RectangleF
rect
The rectangle area to paint the border within. |
Overrides
PaintElement(IGraphics, Single, SizeF)
Paints the element by applying appropriate orientation transforms for fill, content, and border painting, ensuring each painting phase uses the correct coordinate system for proper visual rendering.
Declaration
protected override void PaintElement(IGraphics graphics, float angle, SizeF scale)
Parameters
|
IGraphics
graphics
The graphics context for painting operations. |
|
System.Single
angle
The rotation angle for painting transformations. |
|
System.Drawing.SizeF
scale
The scale factor for painting operations. |
Overrides
PaintFill(IGraphics, Single, SizeF, RectangleF)
Paints the element's fill by first modifying the paint rectangle according to fill padding settings, then delegating to the base implementation for actual fill rendering.
Declaration
protected override void PaintFill(IGraphics graphics, float angle, SizeF scale, RectangleF rect)
Parameters
|
IGraphics
graphics
The graphics context for fill painting. |
|
System.Single
angle
The rotation angle for fill painting. |
|
System.Drawing.SizeF
scale
The scale factor for fill painting. |
|
System.Drawing.RectangleF
rect
The rectangle area to paint the fill within. |
Overrides
PrePaintElement(IGraphics)
Performs pre-paint operations including updating the rotation and padding properties of background image shapes based on the current border and fill orientation, then restores original values after base painting.
Declaration
protected override void PrePaintElement(IGraphics graphics)
Parameters
|
IGraphics
graphics
The graphics context used for painting operations. |
Overrides
SetBorderAndFillOrientation(PageViewContentOrientation, Boolean)
Sets the border and fill orientation for this element and optionally for all child RadPageViewElementBase elements, invalidating the fill cache when the orientation changes to ensure proper visual rendering.
Declaration
protected virtual void SetBorderAndFillOrientation(PageViewContentOrientation orientation, bool recursive)
Parameters
|
PageViewContentOrientation
orientation
The new border and fill orientation to apply. |
|
System.Boolean
recursive
Whether to apply the orientation change to child page view elements recursively. |
SetContentOrientation(PageViewContentOrientation, Boolean)
Sets the content orientation for this element and optionally for all child RadPageViewElementBase elements, invalidating fill cache and measurements when the orientation changes.
Declaration
protected virtual void SetContentOrientation(PageViewContentOrientation orientation, bool recursive)
Parameters
|
PageViewContentOrientation
orientation
The new content orientation to apply. |
|
System.Boolean
recursive
Whether to apply the orientation change to child page view elements recursively. |