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
public RadPageViewElementBase()
Fields
public static RadProperty BorderPaddingProperty
public static RadProperty FillPaddingProperty
Properties
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.
[Browsable(false)]
public PageViewContentOrientation BorderAndFillOrientation { get; }
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.
public Padding BorderPadding { get; set; }
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.
[Browsable(false)]
public PageViewContentOrientation ContentOrientation { get; }
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.
public Padding FillPadding { get; set; }
Methods
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.
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.
Applies rotation and translation transforms to the graphics context based on the specified orientation, enabling rotated rendering for vertical and flipped orientations.
protected virtual object ApplyOrientationTransform(IGraphics graphics, PageViewContentOrientation orientation)
The graphics context to transform.
orientationPageViewContentOrientationThe 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.
Arranges all child elements within the client rectangle derived from the final size, ensuring each child element is positioned within the available space.
protected virtual void ArrangeChildren(SizeF finalSize)
The final size used to calculate the client rectangle for child arrangement.
Arranges the element's content using the layout manager, with dimension swapping for vertical orientations to ensure proper content positioning in rotated coordinate systems.
protected virtual void ArrangeContent(SizeF finalSize)
The final size available for content arrangement.
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.
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.
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.
Calculates the rotation angle and offset coordinates required to transform graphics rendering for the specified orientation, supporting 90, 180, and 270 degree rotations.
protected virtual void CalculateRotationAndOffset(PageViewContentOrientation orientation, ref float angle, ref float offsetX, ref float offsetY)
The orientation that determines the transformation parameters.
anglefloatThe rotation angle in degrees (output parameter).
offsetXfloatThe X-axis offset for proper positioning after rotation (output parameter).
offsetYfloatThe Y-axis offset for proper positioning after rotation (output parameter).
Applies the appropriate orientation transform for fill and border painting operations by delegating to ApplyOrientationTransform(IGraphics, PageViewContentOrientation) with the current border and fill orientation.
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.
protected SizeF GetLightVisualElementSize(SizeF available)
The available size for measurement.
Returns:The measured size from the base LightVisualElement implementation.
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.
Initializes the default field values for the page view element, including content orientation settings, image layout configuration, and layout policy bypassing for optimized performance.
protected override void InitializeFields()
Overrides:
Measures the content size using the layout manager, with dimension swapping for vertical orientations to ensure proper measurement in rotated coordinate systems.
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.
Modifies the border and fill paint rectangle by swapping dimensions for vertical orientations and applying the specified padding to create the final painting area.
protected virtual RectangleF ModifyBorderAndFillPaintRect(RectangleF preferred, Padding padding)
The preferred rectangle for painting operations.
paddingPaddingThe padding to apply to the rectangle.
Returns:The modified rectangle adjusted for orientation and padding requirements.
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.
protected override void PaintBorder(IGraphics graphics, float angle, SizeF scale, RectangleF rect)
The graphics context for border painting.
anglefloatThe rotation angle for border painting.
scaleSizeFThe scale factor for border painting.
rectRectangleFThe rectangle area to paint the border within.
Overrides:
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.
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.
protected override void PaintFill(IGraphics graphics, float angle, SizeF scale, RectangleF rect)
The graphics context for fill painting.
anglefloatThe rotation angle for fill painting.
scaleSizeFThe scale factor for fill painting.
rectRectangleFThe rectangle area to paint the fill within.
Overrides:
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.
protected override void PrePaintElement(IGraphics graphics)
The graphics context used for painting operations.
Overrides:
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.
protected virtual void SetBorderAndFillOrientation(PageViewContentOrientation orientation, bool recursive)
The new border and fill orientation to apply.
recursiveboolWhether to apply the orientation change to child page view elements recursively.
Sets the content orientation for this element and optionally for all child RadPageViewElementBase elements, invalidating fill cache and measurements when the orientation changes.
protected virtual void SetContentOrientation(PageViewContentOrientation orientation, bool recursive)
The new content orientation to apply.
recursiveboolWhether to apply the orientation change to child page view elements recursively.