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
Identifies whether the item margin is adjusted to follow the orientation of its view.
public static RadProperty AutoFlipMarginProperty
Identifies the property that positions the item's close and pin buttons relative to its content.
public static RadProperty ButtonsAlignmentProperty
Identifies the item description, which falls back to the item's text when empty.
public static RadProperty DescriptionProperty
Identifies whether the item is pinned; changes to this property affect layout.
public static RadProperty IsPinnedProperty
Identifies whether the item is displayed as a preview.
public static RadProperty IsPreviewProperty
Identifies whether the page view item is selected.
public static RadProperty IsSelectedProperty
Identifies the item title, which falls back to the item's text when empty.
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 row assigned to this item by a multi-row view; the initial value is -1.
public int Row { get; set; }
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 content and places the buttons panel according to its alignment, item orientation, and RTL setting.
protected override void ArrangeChildren(SizeF available)
The available size for arranging child elements.
Overrides:
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.
Combines content and button-panel sizes according to ButtonsAlignment.
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 item using the owning view's individual or equal-size setting when one supplies a concrete size.
Notifies the owning view when this item is clicked.
protected override void OnClick(EventArgs e)
The click event data.
Overrides:
Lets the owning view approve or cancel a content replacement before it is applied.
protected virtual bool OnContentChanging(RadElement value)
The proposed content element.
Returns:true when the change is allowed.
Records the drag origin and notifies the owning view, unless a child of the selected page has focus.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event data.
Overrides:
Notifies the owning view that the pointer entered this item.
Clears the pressed state and notifies the owning view that the pointer left this item.
Starts item dragging when the configured mouse button moves beyond the drag threshold while captured.
protected override void OnMouseMove(MouseEventArgs e)
The mouse event data.
Overrides:
Forwards the pointer-release event to the owning view.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event data.
Overrides:
Synchronizes changed properties with the associated page and owner, invalidates measurement when pinning changes, and re-arranges rows for selected strip items.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property-change event data.
Overrides:
Clears cached layout sizes when the item is removed from its element tree.
protected override void OnUnloaded(ComponentThemableElementTree oldTree)
The element tree from which the item was unloaded.
Overrides:
Draws a focus rectangle for the selected item when its parent control has focus and displays focus cues.
Selects this item's page when its text contains the pressed mnemonic and the owning view allows mnemonics.
Converts button alignment to the item's content orientation; overlay alignment remains unchanged.
protected virtual PageViewItemButtonsAlignment RotateButtonsAlignment(PageViewItemButtonsAlignment alignment)
The alignment before orientation is applied.
Returns:The orientation-adjusted alignment.
Reverses before/after button alignment for right-to-left layout.
protected virtual PageViewItemButtonsAlignment RTLTransformButtonsAlignment(PageViewItemButtonsAlignment alignment)
The unadjusted button alignment.
Returns:The alignment appropriate for right-to-left layout.
Updates the cached current size whenever the item's bounds are assigned.
protected override void SetBoundsCore(Rectangle bounds)
The new item bounds.
Overrides:
Stores the new content element and notifies the owning view that item content changed.
protected virtual void SetContentCore(RadElement value)
The content element to display.
Resets cached size and applies the new orientation to the buttons panel and item element tree.
protected override void SetContentOrientation(PageViewContentOrientation orientation, bool recursive)
The content orientation to apply.
recursivebooltrue to apply the orientation recursively to descendants.
Overrides:
Excludes the buttons panel from the base child measurement because the panel is measured separately.
protected override bool ShouldMeasureChild(RadElement child)
The child element being considered.
Returns:false for the buttons panel; otherwise, the base result.
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: