This class represents the element that implements the ExplorerBar view of the RadPageView control. This view allows for multiple visible pages, whereby items can be expanded/collapsed to show their content in an associated page.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadPageViewExplorerBarElement : RadPageViewStackElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadPageViewElementBaseRadPageViewElementRadPageViewStackElementRadPageViewExplorerBarElement...
Implements:
Inherited Members
Constructors
public RadPageViewExplorerBarElement()
Fields
public static readonly RadProperty ContentSizeModeProperty
Properties
Gets or sets a value from the ExplorerBarContentSizeMode enum that defines how the content areas for each item are sized.
public ExplorerBarContentSizeMode ContentSizeMode { get; set; }
Gets a value indicating whether non-client area modification is enabled for the explorer bar view.
protected override bool EnableNCModification { get; }
Overrides:
Gets a value indicating whether non-client area painting is enabled for the explorer bar view.
protected override bool EnableNCPainting { get; }
Overrides:
Gets an instance of the RadScrollBarElement that represents the scrollbar of the RadPageViewExplorerBarElement.
[Browsable(false)]
public RadScrollBarElement Scrollbar { get; }
Methods
Arranges the content areas for all explorer bar items by calculating layout information and positioning each item's associated content area element within the available space.
protected override RectangleF ArrangeContent(RectangleF clientRect)
The client rectangle for content arrangement.
Returns:The client rectangle after content arrangement.
Overrides:
Arranges the explorer bar element by resetting the layout offset based on scrollbar visibility and delegating to the base arrangement implementation.
Arranges the scrollbar within the specified client rectangle, positioning it based on the current stack position and RTL settings, then updates the scrollbar metrics.
protected virtual RectangleF ArrangeScrollbar(RectangleF clientRect)
The client rectangle for scrollbar positioning.
Returns:The client rectangle after scrollbar arrangement.
Checks whether the scrollbar should be shown by comparing the client rectangle dimensions with the full layout length to determine if content overflow exists.
protected virtual bool CheckShowScrollbar(RectangleF clientRect)
The client rectangle to check against.
Returns:True if the scrollbar should be displayed due to content overflow; otherwise, false.
Creates and initializes the child elements including the scrollbar for the explorer bar view, setting up event handlers and default properties for proper scrolling functionality.
protected override void CreateChildElements()
Overrides:
Creates a new explorer bar item instance for use in the explorer bar view.
protected override RadPageViewItem CreateItem()
A new RadPageViewExplorerBarItem instance.
Overrides:
Disposes of managed resources by unsubscribing from event handlers to prevent memory leaks and ensure proper cleanup of the explorer bar element.
protected override void DisposeManagedResources()
Overrides:
Ensures the specified item is visible by scrolling to it within the explorer bar view.
protected override bool EnsureItemVisibleCore(RadPageViewItem item)
The page view item to make visible.
Returns:True if the item was successfully made visible through scrolling; otherwise, false.
Overrides:
Ensures the specified explorer bar item is visible by calculating the required scroll offset and adjusting the scrollbar value to position the item within the visible area.
protected virtual void EnsureVisible(RadPageViewExplorerBarItem item)
The explorer bar item to make visible.
Finds the parent control of the specified control by traversing up the hierarchy, excluding RadPageViewPage instances to find the actual parent control.
Finds the parent RadPageViewItem associated with the specified control by traversing up the control hierarchy to locate the containing RadPageViewPage.
protected virtual RadPageViewItem FindParentItem(Control activeControl)
The control to find the parent item for.
Returns:The parent page view item, or null if not found.
Finds the vertical offset of the specified control by traversing up the parent hierarchy and accumulating Y coordinates until reaching the element tree control.
Gets the border thickness for the explorer bar element, returning empty padding when checking draw border to disable default border drawing in favor of non-client area painting.
Gets the client rectangle by adjusting the base client rectangle with non-client area metrics, accounting for header, footer, and border dimensions when an owner is present.
protected override RectangleF GetClientRectangle(SizeF finalSize)
The final size to calculate the client rectangle from.
Returns:The adjusted client rectangle excluding non-client areas.
Overrides:
Gets the content area element associated with the specified item. In explorer bar view, each item has its own dedicated content area element for displaying expanded content.
public override RadPageViewContentAreaElement GetContentAreaForItem(RadPageViewItem item)
The page view item to get the content area for.
Returns:The content area element associated with the item, or the default content area if item is null.
Overrides:
Gets the layout information for all content areas by calculating the content rectangle for each explorer bar item and creating layout info objects for arrangement.
protected List<ContentAreaLayoutInfo> GetContentAreaLayoutInfos(RectangleF clientRect)
The client rectangle for layout calculations.
Returns:List<ContentAreaLayoutInfo>
A list of content area layout information for all items in the explorer bar.
Gets the focused control from the specified control collection by recursively searching through the hierarchy for a control that contains focus.
protected virtual Control GetFocusedControl(Control.ControlCollection controls)
The control collection to search for focused controls.
Returns:The focused control, or null if no focused control is found.
Gets the initial offset for positioning items within the client rectangle, based on the current scrolling position and layout requirements.
protected override float GetInitialItemsOffset(RectangleF clientRect)
The client rectangle for item positioning.
Returns:The initial offset value for item layout.
Overrides:
Gets the rectangle area available for items layout by adjusting the client rectangle to account for header and footer elements with their margins and desired sizes.
public override RectangleF GetItemsRect()
The rectangle area available for positioning explorer bar items.
Overrides:
Gets the non-client area metrics including border thickness and header/footer dimensions, with processing controlled by the allowNCCALCSIZEProcessing flag.
protected override Padding GetNCMetrics()
The padding representing the non-client area metrics.
Overrides:
Gets the next focused control from the control collection based on tab index navigation, supporting both forward and backward navigation through controls.
protected virtual Control GetNextFocusedControl(Control.ControlCollection controls, int currentTabIndex, int step)
The control collection to search for the next focusable control.
currentTabIndexintThe current tab index as reference point.
stepintThe step direction for navigation (positive for forward, negative for backward).
Returns:The next control to focus based on tab order, or null if none found.
Gets the arrow direction for peek popup displays in the explorer bar view, returning up direction to align with the vertical layout of the explorer bar items.
protected override ArrowDirection GetPeekPopupArrowDirection()
The ArrowDirection for peek popup positioning.
Overrides:
Initializes default field values for the explorer bar element, setting the item selection mode to content after selected and stack position to top for proper explorer bar behavior.
protected override void InitializeFields()
Overrides:
Determines whether the specified element is considered external to the normal child element hierarchy, excluding the scrollbar from external element checks.
protected override bool IsChildElementExternal(RadElement element)
The element to check for external status.
Returns:True if the element is external (excluding the scrollbar); otherwise, false.
Overrides:
Determines whether the specified key represents a "next" navigation key based on the current stack position, with Up key for top position and Left key for left position.
Determines whether the specified key represents a "previous" navigation key based on the current stack position, with Down key for top position and Right key for left position.
Measures the content area by measuring the scrollbar and returns empty size since content areas are handled individually for each explorer bar item.
Measures all items in the explorer bar, accounting for scrollbar space and calculating content sizes for each expanded item based on their associated content area requirements.
Handles bounds changes by checking if non-client area metrics have changed and refreshing the non-client area accordingly to maintain proper visual layout.
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
The event arguments containing information about the bounds change.
Overrides:
Handles content bounds changes by updating the bounds of all visible pages to match their associated content area elements, ensuring proper page layout synchronization.
protected override void OnContentBoundsChanged()
Overrides:
Raises the ExpandedChanged event when an explorer bar item's expanded state changes, allowing subscribers to respond to expansion and collapse operations.
protected virtual void OnExpandedChanged(RadPageViewExpandedChangedEventArgs e)
The event arguments containing information about the expanded state change.
Handles the collapsing event for an explorer bar item by raising the appropriate events and allowing cancellation of the collapse operation.
protected virtual bool OnItemCollapsing(RadPageViewExplorerBarItem item)
The explorer bar item that is about to collapse.
Returns:True if the collapse should be cancelled; otherwise, false.
Handles the expanding event for an explorer bar item by raising the appropriate events and allowing cancellation of the expansion operation.
protected virtual bool OnItemExpanding(RadPageViewExplorerBarItem item)
The explorer bar item that is about to expand.
Returns:True if the expansion should be cancelled; otherwise, false.
Handles mouse up events on explorer bar items by toggling their expanded state when left-clicked, providing the primary interaction mechanism for expand/collapse operations.
protected override void OnItemMouseUp(RadPageViewItem sender, MouseEventArgs e)
The explorer bar item that received the mouse up event.
eMouseEventArgsThe mouse event arguments containing button and position information.
Overrides:
Handles the loaded event by setting the page visibility for all explorer bar items based on their expanded state, ensuring proper initial display of content areas.
protected override void OnLoaded()
Overrides:
Handles mouse wheel events by translating wheel movements into scrollbar value changes, enabling smooth scrolling through the explorer bar items.
protected override void OnMouseWheel(MouseEventArgs e)
The mouse event arguments containing wheel delta information.
Overrides:
Handles non-client area painting by rendering header, footer, and border elements in separate bitmaps for each area (top, left, right, bottom) and compositing them onto the graphics context.
protected override void OnNCPaint(Graphics g)
The graphics context for non-client area painting.
Overrides:
Handles page addition by creating an explorer bar item and associating it with a content area element, setting up the proper item-to-content relationship for the explorer bar view.
protected override void OnPageAdded(RadPageViewEventArgs e)
The event arguments containing information about the added page.
Overrides:
Handles page removal by disposing of the associated content area element and cleaning up the item-to-content relationship for the explorer bar view.
protected override void OnPageRemoved(RadPageViewEventArgs e)
The event arguments containing information about the removed page.
Overrides:
Handles property change events, with special handling for stack position changes to update scrollbar parameters and ensure proper layout orientation.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The event arguments containing information about the changed property.
Overrides:
Handles selected page changes by refreshing the non-client area to ensure proper visual updates when the selected explorer bar item changes.
protected override void OnSelectedPageChanged(RadPageViewEventArgs e)
The event arguments containing information about the page change.
Overrides:
Finds the explorer bar item that contains a control with focus by checking all items for focused controls within their page control collections.
protected virtual RadPageViewStackItem PageWithFocusedControl()
The stack item containing a focused control, or null if none found.
Overrides border painting to disable default border rendering for the explorer bar view, as borders are handled through the non-client area painting mechanism.
Performs the arrangement of elements by correcting the client rectangle for scrollbar space, arranging content and items, and updating scrollbar positioning.
protected override RectangleF PerformArrange(RectangleF clientRect)
The client rectangle for element arrangement.
Returns:The corrected client rectangle after scrollbar adjustments.
Overrides:
Processes auto-scroll functionality for the specified control by calculating the required scroll offset and updating the scrollbar value to ensure the control becomes visible.
Processes key down events to handle expansion and collapse of explorer bar items using arrow keys, with key mappings that depend on the current stack position orientation.
protected override void ProcessKeyDown(KeyEventArgs e)
The key event arguments containing information about the pressed key.
Overrides:
Scrolls to make the specified control visible in the explorer bar view by expanding its parent item if needed, processing auto-scroll, and focusing the control.
public virtual void ScrollToControl(Control control)
The control to scroll to and focus.
Scrolls the view to make the specified explorer bar item visible within the client area, adjusting the scrollbar value and layout offset as needed.
public virtual bool ScrollToItem(RadPageViewExplorerBarItem item)
The explorer bar item to scroll to.
Returns:True if scrolling was performed; false if the item is already fully visible or layout info is unavailable.
Sets the index of an explorer bar item by moving it within both the items collection and the children collection, ensuring proper synchronization between logical and visual ordering.
Sets the selected content for the specified item. In explorer bar view, content selection is handled differently as each item has its own associated content area.
protected override void SetSelectedContent(RadPageViewItem item)
The item to set as selected content.
Overrides:
Sets the value of a property with validation for explorer bar specific constraints, preventing invalid item selection modes and stack positions that are not supported by the explorer bar view.
protected override ValueUpdateResult SetValueCore(RadPropertyValue propVal, object propModifier, object newValue, ValueSource source)
The property value container.
propModifierobjectThe property modifier object.
newValueobjectThe new value to set.
sourceValueSourceThe source of the value change.
Returns:The result of the value update operation.
Overrides:
Updates scrollbar metrics and arranges the scrollbar within the client rectangle, managing scrollbar visibility based on content overflow and correcting layout offsets as needed.
protected virtual void UpdateAndArrangeScrollbar(RectangleF clientRect)
The client rectangle for scrollbar arrangement.
Updates the scrollbar metrics including large change, minimum, and maximum values based on the client rectangle dimensions and full layout length calculations.
protected virtual void UpdateScrollbarMetrics(RectangleF clientRect)
The client rectangle used for scrollbar metric calculations.
Events
Occurs when an explorer bar item's expanded state changes, allowing subscribers to respond to expansion and collapse operations.
public event EventHandler<RadPageViewExpandedChangedEventArgs> ExpandedChanged