ClassRadPageViewElementBase
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.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadPageViewElementBase : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadPageViewElementBase
Derived Classes:
Implements:
Inherited Members
Constructors
RadPageViewElementBase()
Declaration
public RadPageViewElementBase()
Fields
BorderPaddingProperty
Declaration
public static RadProperty BorderPaddingProperty
Field Value
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
[Browsable(false)]
public PageViewContentOrientation BorderAndFillOrientation { get; }
Property Value
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.
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
[Browsable(false)]
public PageViewContentOrientation ContentOrientation { get; }
Property Value
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.
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.
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.
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
graphics
The graphics context to transform.
orientation
The orientation that determines the transformation to apply.
Returns
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
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
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.
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.
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
contentSize
The size required by the element's content.
childSize
The size required by the element's child elements.
Returns
The combined measured size that accommodates both content and children.
CalculateRotationAndOffset(PageViewContentOrientation, ref float, ref float, ref float)
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
orientation
The orientation that determines the transformation parameters.
angle
The rotation angle in degrees (output parameter).
offsetX
The X-axis offset for proper positioning after rotation (output parameter).
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.
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
available
The available size for measurement.
Returns
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.
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.
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.
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
preferred
The preferred rectangle for painting operations.
padding
The padding to apply to the rectangle.
Returns
The modified rectangle adjusted for orientation and padding requirements.
PaintBorder(IGraphics, float, 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
graphics
The graphics context for border painting.
angle
The rotation angle for border painting.
scale
The scale factor for border painting.
rect
The rectangle area to paint the border within.
Overrides
PaintElement(IGraphics, float, 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
graphics
The graphics context for painting operations.
angle
The rotation angle for painting transformations.
scale
The scale factor for painting operations.
Overrides
PaintFill(IGraphics, float, 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
graphics
The graphics context for fill painting.
angle
The rotation angle for fill painting.
scale
The scale factor for fill painting.
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
graphics
The graphics context used for painting operations.
Overrides
SetBorderAndFillOrientation(PageViewContentOrientation, bool)
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
orientation
The new border and fill orientation to apply.
recursive
Whether to apply the orientation change to child page view elements recursively.
SetContentOrientation(PageViewContentOrientation, bool)
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
orientation
The new content orientation to apply.
recursive
Whether to apply the orientation change to child page view elements recursively.