RadPageViewItem
Serves as the base class for all page view items within the RadPageView control, providing common functionality for item representation, interaction, content management, and visual appearance customization.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class RadPageViewItem : RadPageViewElementBase, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadPageViewElementBaseRadPageViewItem...
Derived Classes:
Implements:
Inherited Members
Constructors
protected RadPageViewItem()
Fields
public static RadProperty AutoFlipMarginProperty
public static RadProperty ButtonsAlignmentProperty
public static RadProperty DescriptionProperty
public static RadProperty IsPinnedProperty
public static RadProperty IsPreviewProperty
public static RadProperty IsSelectedProperty
public static RadProperty TitleProperty
Properties
Gets or sets a value indicating whether the item margin will be automatically flipped according to the orientation of items in the RadPageView control to maintain proper spacing and alignment.
public bool AutoFlipMargin { get; set; }
Gets or sets the alignment of the item's associated buttons relative to the item content, controlling the positioning of close and pin buttons within the item layout.
public PageViewItemButtonsAlignment ButtonsAlignment { get; set; }
Gets the RadPageViewItemButtonsPanel that contains all buttons associated with the item, including close and pin buttons for user interaction.
[Browsable(false)]
public RadPageViewItemButtonsPanel ButtonsPanel { get; }
Gets or sets the RadElement instance that represents the content of this item. The content is used when the item is not bound to a RadPageViewPage instance.
public RadElement Content { get; set; }
Gets the current size of the item. This may differ from Bounds.Size as it reflects internal changes within the item itself during layout and measurement operations.
[Browsable(false)]
public SizeF CurrentSize { get; }
Gets or sets the description of the item. The description is displayed in the footer area of the owning view element. If no description is explicitly set, the Text property value is returned.
public string Description { get; set; }
Gets the size that is forced by the layout element for this item. This may differ from the DesiredSize when layout constraints or sizing modes override the natural item measurements.
[Browsable(false)]
public SizeF ForcedLayoutSize { get; }
Gets or sets a value indicating whether the item is pinned. Pinned items appear in front of other items and maintain their position regardless of selection state or other ordering changes.
public virtual bool IsPinned { get; set; }
Gets or sets a value indicating whether the item is opened for preview, allowing temporary content display without fully selecting the item or changing the current selection state.
public virtual bool IsPreview { get; set; }
Gets a value indicating whether this item is currently selected (associated with the SelectedPage of the owning RadPageView). Selection affects visual appearance and content display.
[Browsable(false)]
public virtual bool IsSelected { get; set; }
Gets or sets a value indicating whether the current instance is internally created by the view element and represents built-in functionality rather than user-created content.
[Browsable(false)]
public bool IsSystemItem { get; }
Gets the RadPageViewElement that owns this item.
public virtual RadPageViewElement Owner { get; }
Gets the RadPageViewPage instance associated with this item. This page contains the actual content displayed when the item is selected.
[Browsable(false)]
public RadPageViewPage Page { get; }
Gets or sets the show keyboard cues.
public override bool ShowKeyboardCues { get; set; }
The show keyboard cues.
Overrides:
Gets or sets the title of the item. The title is displayed in the header area of the owning view element. If no title is explicitly set, the Text property value is returned.
public string Title { get; set; }
Gets or sets the use mnemonic.
public override bool UseMnemonic { get; set; }
The use mnemonic.
Overrides:
Methods
Arranges all child elements within the client rectangle derived from the final size, ensuring each child element is positioned within the available space.
Attaches this item to the specified RadPageViewPage, establishing a bidirectional relationship and synchronizing visual properties from the page to the item.
public virtual void Attach(RadPageViewPage page)
The page to attach to this item.
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.
protected override SizeF CalculateMeasuredSize(SizeF contentSize, SizeF childSize)
The size required by the element's content.
childSizeSizeFThe size required by the element's child elements.
Returns:The combined measured size that accommodates both content and children.
Overrides:
Creates the buttons panel for this page view item, containing close and pin buttons.
protected virtual RadPageViewItemButtonsPanel CreateButtonsPanel()
A new RadPageViewItemButtonsPanel instance associated with this item.
Creates child elements including the buttons panel and sets up property bindings for close and pin buttons to synchronize with the item's selected and pinned states.
protected override void CreateChildElements()
Overrides:
Detaches this item from its associated RadPageViewPage, breaking the bidirectional relationship and clearing page references to prepare for disposal or reassignment.
public virtual void Detach()
Disposes of managed resources by detaching from the associated page and clearing owner references to prevent memory leaks and ensure proper cleanup.
protected override void DisposeManagedResources()
Overrides:
Initializes default field values for the page view item, setting up drag support, sizing constraints, text and image alignment, and keyboard interaction properties.
protected override void InitializeFields()
Overrides:
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.
Raises the Click event.
Called when a mouse button is pressed down over the item.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event arguments.
Overrides:
Called when the mouse moves over the item, handling highlight and border highlight effects.
protected override void OnMouseMove(MouseEventArgs e)
The mouse event arguments.
Overrides:
Called when a mouse button is released over the item.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event arguments.
Overrides:
Handles property change events by invalidating the fill cache and invoking the base class property change handler.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Event arguments containing information about the property that changed.
Overrides:
Notifies that the element has been successfully unloaded from an element tree. Allows inheritors to provide custom logic at this stage.
protected override void OnUnloaded(ComponentThemableElementTree oldTree)
Reference to the element tree from which the element has been unloaded.
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.
protected virtual PageViewItemButtonsAlignment RotateButtonsAlignment(PageViewItemButtonsAlignment alignment)
protected virtual PageViewItemButtonsAlignment RTLTransformButtonsAlignment(PageViewItemButtonsAlignment alignment)
Sets the bounds of the element to the specified rectangle.
protected override void SetBoundsCore(Rectangle bounds)
The rectangle to set as bounds.
Overrides:
Sets the content orientation for this element and optionally for all child RadPageViewElementBase elements, invalidating fill cache and measurements when the orientation changes.
protected override void SetContentOrientation(PageViewContentOrientation orientation, bool recursive)
The new content orientation to apply.
recursiveboolWhether to apply the orientation change to child page view elements recursively.
Overrides:
Gets a value indicating, whether a child will be measured during the MeasureOverride.
protected override bool ShouldMeasureChild(RadElement child)
The child.
Returns:Whether the child will be measured in MeasureOverride.
Overrides:
Determines whether the specified property should be serialized, with special handling for the AutoEllipsis property to serialize only when it differs from the default value.
public override bool? ShouldSerializeProperty(PropertyDescriptor property)
The property descriptor to check for serialization.
Returns:bool?
True if the property should be serialized; false if it should not; null for default behavior.
Overrides:
Returns a string representation of this page view item including the type name and text content.
public override string ToString()
A string containing the type name and text of the item.
Overrides: