RadPageViewElement
Encapsulates the UI representation of a RadPageView instance. Different view modes are represented by different implementations of this abstract class.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class RadPageViewElement : RadPageViewElementBase, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadPageViewElementBaseRadPageViewElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadPageViewElement class.
public RadPageViewElement()
Fields
Identifies the EnsureSelectedItemVisible dependency property.
public static RadProperty EnsureSelectedItemVisibleProperty
Identifies the ItemBorderAndFillOrientation dependency property.
public static RadProperty ItemBorderAndFillOrientationProperty
Identifies the ItemContentOrientation dependency property.
public static RadProperty ItemContentOrientationProperty
Identifies the ItemDragHint dependency property.
public static RadProperty ItemDragHintProperty
Identifies the ItemDragMode dependency property.
public static RadProperty ItemDragModeProperty
Identifies the ItemSizeMode dependency property.
public static RadProperty ItemSizeModeProperty
Identifies the ItemSpacing dependency property.
public static RadProperty ItemSpacingProperty
Identifies the ShowItemCloseButton dependency property.
public static RadProperty ShowItemCloseButtonProperty
Properties
Gets or sets the mouse button that will be used to select page view items.
public MouseButtons ActionMouseButton { get; set; }
Gets the active text editor used for in-place editing of page view items.
public IInputEditor ActiveEditor { get; }
Gets or sets a value indicating whether in-place editing of page view item text is allowed.
[Browsable(false)]
public bool AllowEdit { get; set; }
Gets the element that represents the content area where page controls are displayed.
[Browsable(false)]
public RadPageViewElementBase ContentArea { get; }
Gets or sets the default RadPageViewPage that will be selected when the element is initialized.
public RadPageViewPage DefaultPage { get; set; }
protected virtual bool EnableNCModification { get; }
protected virtual bool EnableNCPainting { get; }
Gets or sets a value indicating whether a peek pop-up window can be displayed when a page view item is hovered with the mouse. The content of the peek pop-up must be set in the PeekPopupOpening event.
public virtual bool EnablePeekPopup { get; set; }
Gets or sets a value indicating whether the currently selected item will be automatically scrolled into view.
public bool EnsureSelectedItemVisible { get; set; }
Gets the footer element that can be used to display text or content at the bottom of the page view.
public virtual RadPageViewLabelElement Footer { get; }
Gets the header element that can be used to display text or content at the top of the page view.
public virtual RadPageViewLabelElement Header { get; }
Gets or sets how each page view item's border and fill elements are oriented within this instance.
public PageViewContentOrientation ItemBorderAndFillOrientation { get; set; }
Gets or sets the content orientation for text and images within page view items in this RadPageViewElement instance.
public PageViewContentOrientation ItemContentOrientation { get; set; }
Gets or sets the RadImageShape instance that describes the visual hint indicating where an item will be dropped after a drag operation.
[Browsable(false)]
[VsbBrowsable(true)]
public RadImageShape ItemDragHint { get; set; }
Gets or sets the mode that controls how item drag and drop operations are handled within this element.
public PageViewItemDragMode ItemDragMode { get; set; }
Gets or sets the RadDragDropService instance that handles item drag and drop operations.
[Browsable(false)]
public RadDragDropService ItemDragService { get; set; }
Gets a read-only collection containing all the RadPageViewItem instances currently present within this element.
[Browsable(false)]
public IReadOnlyCollection<RadPageViewItem> Items { get; }
Gets or sets the size that will be applied to page view items when ItemSizeMode is set to EqualSize.
public Size ItemSize { get; set; }
Gets or sets how page view items are sized within this RadPageViewElement instance.
public PageViewItemSizeMode ItemSizeMode { get; set; }
Gets or sets the spacing in pixels between adjacent page view items within this element.
public int ItemSpacing { get; set; }
Gets the RadElement instance that serves as the parent container for all page view items.
protected abstract RadElement ItemsParent { get; }
Gets the RadContextMenu that displays the overflow pages when there are too many items to display.
public RadContextMenu OverflowPagesContextMenu { get; }
Gets the RadPageView instance that owns this element. May be null if this element is hosted on another RadControl instance.
public RadPageView Owner { get; }
Gets the peek pop-up window, which is represented by a RadCallout. The content of the peek pop-up must be set in the PeekPopupOpening event and EnablePeekPopup must be enabled.
public RadCallout PeekPopup { get; }
Gets or sets the time interval in milliseconds required to display a PeekPopup after a RadPageViewItem is hovered.
public int PeekPopupInterval { get; set; }
Gets the timer used to delay the display of the peek pop-up window.
protected Timer PeekTimer { get; }
Gets or sets the currently selected RadPageViewItem in this view.
[Browsable(false)]
public RadPageViewItem SelectedItem { get; set; }
Gets or sets a value indicating whether page selection will wrap around when using arrow keys for navigation. If set to true, pressing the right arrow key when the last page is selected will select the first page.
[Browsable(true)]
public bool SelectionWrap { get; set; }
Gets or sets a value indicating whether a close button will be displayed in each item, allowing the item to be closed.
public bool ShowItemCloseButton { get; set; }
Gets or sets a value indicating whether selecting an item will update the content displayed in the element's ContentArea.
public bool UpdateSelectedItemContent { get; set; }
Methods
Adds the specified RadPageViewItem to this element's items collection.
Performs the core logic for adding an item to the collection.
protected virtual void AddItemCore(RadPageViewItem item)
The item to add.
protected virtual RectangleF ArrangeContent(RectangleF clientRect)
protected void ArrangeExternalElements(RectangleF clientRect, SizeF finalSize)
Arranges the page view items and returns the available rectangle where the content area should be positioned.
protected virtual RectangleF ArrangeItems(RectangleF itemsRect)
The rectangle available for arranging items.
Returns:A RectangleF representing the available content area.
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.
Puts the currently selected page view item into edit mode for in-place text editing.
public bool BeginEdit()
true if editing was successfully started; otherwise, false.
protected virtual bool CanDropOverItem(RadPageViewItem dragItem, RadPageViewItem hitItem)
Determines whether the specified item can have a peek pop-up displayed when EnablePeekPopup is enabled.
protected virtual bool CanPeekItem(RadPageViewItem item)
The RadPageViewItem to check.
Returns:true if a peek pop-up can be displayed for the item; otherwise, false.
protected virtual bool CanSelectItem(RadPageViewItem item)
Creates the child elements that compose this page view element.
protected override void CreateChildElements()
Overrides:
Creates a new RadPageViewItem instance for this element.
Displays the item list menu using the specified element as the menu's owner and the specified alignment options.
public void DisplayItemListMenu(RadPageViewElementBase menuOwner, HorizontalPopupAlignment hAlign, VerticalPopupAlignment vAlign)
The element that will own the displayed menu.
hAlignHorizontalPopupAlignmentThe horizontal alignment of the menu relative to the owner.
vAlignVerticalPopupAlignmentThe vertical alignment of the menu relative to the owner.
Displays the item list menu using the specified element as the menu's owner.
public void DisplayItemListMenu(RadPageViewElementBase menuOwner)
The element that will own the displayed menu.
Displays the item list menu using the provided event arguments that contain menu configuration.
protected virtual void DisplayItemListMenu(RadPageViewMenuDisplayingEventArgs e)
The event arguments containing menu display configuration.
Releases the managed resources used by this element.
protected override void DisposeManagedResources()
Overrides:
Commits any changes and ends the edit operation on the current page view item.
public bool EndEdit()
true if the edit operation was successfully ended; otherwise, false.
Ensures that the specified RadPageViewItem is visible within the view area.
public bool EnsureItemVisible(RadPageViewItem item)
The item to make visible.
Returns:true if the item was successfully made visible; otherwise, false.
Performs the core logic for ensuring that the specified item is visible.
protected virtual bool EnsureItemVisibleCore(RadPageViewItem item)
The item to make visible.
Returns:true if the item was successfully made visible; otherwise, false.
Finds the RadPageViewItem that contains the specified content element.
public RadPageViewItem FindItem(RadElement content)
The content element to search for.
Returns:The RadPageViewItem containing the content, or null if not found.
Gets the default (automatic) item orientation, which may depend on implementation-specific settings.
protected virtual PageViewContentOrientation GetAutomaticItemOrientation(bool content)
true to retrieve content orientation; false to get orientation for border and fill.
Returns:The automatic PageViewContentOrientation for items.
Calculates the client rectangle for the specified content area element, excluding padding and border thickness.
public virtual Rectangle GetClientRectangleFromContentElement(RadPageViewContentAreaElement contentArea)
The content area element to calculate the client rectangle for.
Returns:A Rectangle representing the usable client area.
Gets the RadPageViewContentAreaElement instance that represents the content area associated with the specified item. By default, this method returns the main content area of the RadPageView control.
public virtual RadPageViewContentAreaElement GetContentAreaForItem(RadPageViewItem item)
The RadPageViewItem for which to get the content area.
Returns:A RadPageViewContentAreaElement instance.
Gets the RadPageViewItem at the specified index.
public RadPageViewItem GetItemAt(int index)
The zero-based index of the item to retrieve.
Returns:The RadPageViewItem at the specified index.
Gets the rectangular area where page view items are displayed within this element.
Initializes the default field values for this element.
protected override void InitializeFields()
Overrides:
Inserts the specified RadPageViewItem at the specified index in this element's items collection.
public void InsertItem(int index, RadPageViewItem item)
The zero-based index at which to insert the item.
itemRadPageViewItemThe item to insert.
Performs the core logic for inserting an item at the specified index.
protected virtual void InsertItemCore(int index, RadPageViewItem item)
The zero-based index at which to insert the item.
itemRadPageViewItemThe item to insert.
protected virtual bool IsChildElementExternal(RadElement element)
Gets the RadPageViewItem that contains the specified point in client coordinates.
public RadPageViewItem ItemFromPoint(Point client)
The point in client coordinates to test.
Returns:The RadPageViewItem containing the point, or null if no item contains the point.
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.
protected virtual void OnContentBoundsChanged()
protected virtual void OnEditorInitialized(object sender, RadPageViewEditorEventArgs e)
protected virtual void OnItemClick(RadPageViewItem sender, EventArgs e)
protected virtual bool OnItemContentChanging(RadPageViewItem item, RadElement newContent)
protected virtual RadPageViewItem OnItemCreating(RadPageViewItemCreatingEventArgs args)
protected virtual void OnItemDrag(RadPageViewItem sender, MouseEventArgs e)
protected virtual void OnItemDropped(object sender, RadPageViewItemDroppedEventArgs args)
protected virtual void OnItemDropping(object sender, RadPageViewItemDroppingEventArgs args)
protected virtual void OnItemMouseDown(RadPageViewItem sender, MouseEventArgs e)
protected virtual void OnItemMouseUp(RadPageViewItem sender, MouseEventArgs e)
protected virtual void OnItemPropertyChanged(RadPageViewItem item, RadPropertyChangedEventArgs e)
protected virtual void OnItemsChanged(object sender, RadPageViewItemsChangedEventArgs args)
public virtual void OnItemSelected(object sender, RadPageViewItemSelectedEventArgs args)
public virtual void OnItemSelecting(object sender, RadPageViewItemSelectingEventArgs args)
Called when the element is loaded and ready for use.
protected override void OnLoaded()
Overrides:
protected virtual void OnPageIndexChanged(RadPageViewIndexChangedEventArgs e)
protected virtual void OnPeekPopupOpening(RadPageViewPeekPopupEventArgs e)
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:
protected virtual void OnSelectedPageChanged(RadPageViewEventArgs e)
protected virtual RectangleF PerformArrange(RectangleF clientRect)
protected void PerformItemDrop(RadPageViewItem dragItem, RadPageViewItem hitItem)
Core logic when a drag-drop is performed over this element. Allows inheritors to provide their own implementations.
protected override void ProcessDragDrop(Point dropLocation, ISupportDrag dragObject)
The location where the drop occurred.
dragObjectISupportDragThe object being dragged.
Overrides:
Determines whether the element may be treated as a drop target during drag-and-drop operation.
protected override bool ProcessDragOver(Point mousePosition, ISupportDrag dragObject)
The current mouse position.
dragObjectISupportDragThe object being dragged.
Returns:True if the element can accept the drop; otherwise, false.
Overrides:
Removes the specified RadPageViewItem from this element's items collection.
Performs the core logic for removing an item from the collection.
protected virtual void RemoveItemCore(RadPageViewItem item)
The item to remove.
protected virtual bool SelectNextItemCore(RadPageViewItem current, bool forward, bool wrap)
Sets the specified RadPageViewItem as the currently selected item.
protected virtual void SetSelectedItem(RadPageViewItem item)
The item to select, or null to clear the selection.
Displays a peek pop-up window over the specified RadPageViewItem. The content of the peek pop-up must be set in the PeekPopupOpening event.
public void ShowPeekPopup(RadPageViewItem peekItem)
The item over which to display the peek pop-up.
protected virtual void ShowPeekPopupCore(RadPageViewItem peekItem)
Swaps the positions of two RadPageViewItem instances in the collection.
public void SwapItems(RadPageViewItem item1, RadPageViewItem item2)
The first item to swap.
item2RadPageViewItemThe second item to swap.
Synchronizes the indices of all items in the collection with their visual representation.
protected virtual void SynchronizeItemsIndices()
Events
Occurs when an editor for item text editing has been initialized.
public event EventHandler<RadPageViewEditorEventArgs> EditorInitialized
Occurs when a page view item is clicked.
public event EventHandler ItemClicked
Occurs when a new page view item is being created.
public event EventHandler<RadPageViewItemCreatingEventArgs> ItemCreating
Occurs when a page view item has been dropped during a drag operation.
public event EventHandler<RadPageViewItemDroppedEventArgs> ItemDropped
Occurs when a page view item is about to be dropped during a drag operation.
public event EventHandler<RadPageViewItemDroppingEventArgs> ItemDropping
Occurs when the collection of page view items has changed.
public event EventHandler<RadPageViewItemsChangedEventArgs> ItemsChanged
Occurs when a page view item has been selected.
public event EventHandler<RadPageViewItemSelectedEventArgs> ItemSelected
Occurs when a page view item is about to be selected.
public event EventHandler<RadPageViewItemSelectingEventArgs> ItemSelecting
Occurs when the peek pop-up window has been closed.
public event EventHandler PeekPopupClosed
Occurs when the peek pop-up window is about to be displayed. You must populate the content of the peek pop-up in this event handler, otherwise it will not be displayed.
public event EventHandler<RadPageViewPeekPopupEventArgs> PeekPopupOpening