Class RadPageViewExplorerBarElement
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.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadPageViewExplorerBarElement : RadPageViewStackElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadPageViewExplorerBarElement()
Declaration
public RadPageViewExplorerBarElement()
Fields
ContentSizeModeProperty
Properties
ContentSizeMode
Gets or sets a value from the ExplorerBarContentSizeMode enum that defines how the content areas for each item are sized.
Declaration
public ExplorerBarContentSizeMode ContentSizeMode { get; set; }
Property Value
|
ExplorerBarContentSizeMode
|
EnableNCModification
Gets a value indicating whether non-client area modification is enabled for the explorer bar view.
Declaration
protected override bool EnableNCModification { get; }
Property Value
|
System.Boolean
|
Overrides
EnableNCPainting
Gets a value indicating whether non-client area painting is enabled for the explorer bar view.
Declaration
protected override bool EnableNCPainting { get; }
Property Value
|
System.Boolean
|
Overrides
Scrollbar
Gets an instance of the RadScrollBarElement that represents the scrollbar of the RadPageViewExplorerBarElement.
Declaration
public RadScrollBarElement Scrollbar { get; }
Property Value
|
RadScrollBarElement
|
Methods
ArrangeContent(RectangleF)
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.
Declaration
protected override RectangleF ArrangeContent(RectangleF clientRect)
Parameters
|
System.Drawing.RectangleF
clientRect
The client rectangle for content arrangement. |
Returns
|
System.Drawing.RectangleF
The client rectangle after content arrangement. |
Overrides
ArrangeOverride(SizeF)
Arranges the explorer bar element by resetting the layout offset based on scrollbar visibility and delegating to the base arrangement implementation.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
The final size for element arrangement. |
Returns
|
System.Drawing.SizeF
The actual size used for the arrangement. |
Overrides
ArrangeScrollbar(RectangleF)
Arranges the scrollbar within the specified client rectangle, positioning it based on the current stack position and RTL settings, then updates the scrollbar metrics.
Declaration
protected virtual RectangleF ArrangeScrollbar(RectangleF clientRect)
Parameters
|
System.Drawing.RectangleF
clientRect
The client rectangle for scrollbar positioning. |
Returns
|
System.Drawing.RectangleF
The client rectangle after scrollbar arrangement. |
CheckShowScrollbar(RectangleF)
Checks whether the scrollbar should be shown by comparing the client rectangle dimensions with the full layout length to determine if content overflow exists.
Declaration
protected virtual bool CheckShowScrollbar(RectangleF clientRect)
Parameters
|
System.Drawing.RectangleF
clientRect
The client rectangle to check against. |
Returns
|
System.Boolean
True if the scrollbar should be displayed due to content overflow; otherwise, false. |
CreateChildElements()
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.
Declaration
protected override void CreateChildElements()
Overrides
CreateItem()
Creates a new explorer bar item instance for use in the explorer bar view.
Declaration
protected override RadPageViewItem CreateItem()
Returns
|
RadPageViewItem
A new RadPageViewExplorerBarItem instance. |
Overrides
DisposeManagedResources()
Disposes of managed resources by unsubscribing from event handlers to prevent memory leaks and ensure proper cleanup of the explorer bar element.
Declaration
protected override void DisposeManagedResources()
Overrides
EnsureItemVisibleCore(RadPageViewItem)
Ensures the specified item is visible by scrolling to it within the explorer bar view.
Declaration
protected override bool EnsureItemVisibleCore(RadPageViewItem item)
Parameters
|
RadPageViewItem
item
The page view item to make visible. |
Returns
|
System.Boolean
True if the item was successfully made visible through scrolling; otherwise, false. |
Overrides
EnsureVisible(RadPageViewExplorerBarItem)
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.
Declaration
protected virtual void EnsureVisible(RadPageViewExplorerBarItem item)
Parameters
|
RadPageViewExplorerBarItem
item
The explorer bar item to make visible. |
FindParentControl(Control)
Finds the parent control of the specified control by traversing up the hierarchy, excluding RadPageViewPage instances to find the actual parent control.
Declaration
protected virtual Control FindParentControl(Control activeControl)
Parameters
|
System.Windows.Forms.Control
activeControl
The control to find the parent for. |
Returns
|
System.Windows.Forms.Control
The parent control, or the original control if no suitable parent is found. |
FindParentItem(Control)
Finds the parent RadPageViewItem associated with the specified control by traversing up the control hierarchy to locate the containing RadPageViewPage.
Declaration
protected virtual RadPageViewItem FindParentItem(Control activeControl)
Parameters
|
System.Windows.Forms.Control
activeControl
The control to find the parent item for. |
Returns
|
RadPageViewItem
The parent page view item, or null if not found. |
FindParentOffset(Control)
Finds the vertical offset of the specified control by traversing up the parent hierarchy and accumulating Y coordinates until reaching the element tree control.
Declaration
protected virtual int FindParentOffset(Control activeControl)
Parameters
|
System.Windows.Forms.Control
activeControl
The control to find the offset for. |
Returns
|
System.Int32
The calculated vertical offset of the control. |
GetBorderThickness(Boolean)
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.
Declaration
protected override Padding GetBorderThickness(bool checkDrawBorder)
Parameters
|
System.Boolean
checkDrawBorder
Whether to check if borders should be drawn. |
Returns
|
System.Windows.Forms.Padding
The border thickness, or empty padding if draw border checking is enabled. |
Overrides
GetClientRectangle(SizeF)
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.
Declaration
protected override RectangleF GetClientRectangle(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
The final size to calculate the client rectangle from. |
Returns
|
System.Drawing.RectangleF
The adjusted client rectangle excluding non-client areas. |
Overrides
GetContentAreaForItem(RadPageViewItem)
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.
Declaration
public override RadPageViewContentAreaElement GetContentAreaForItem(RadPageViewItem item)
Parameters
|
RadPageViewItem
item
The page view item to get the content area for. |
Returns
|
RadPageViewContentAreaElement
The content area element associated with the item, or the default content area if item is null. |
Overrides
GetContentAreaLayoutInfos(RectangleF)
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.
Declaration
protected List<ContentAreaLayoutInfo> GetContentAreaLayoutInfos(RectangleF clientRect)
Parameters
|
System.Drawing.RectangleF
clientRect
The client rectangle for layout calculations. |
Returns
|
System.Collections.Generic.List<ContentAreaLayoutInfo>
A list of content area layout information for all items in the explorer bar. |
GetFocusedControl(Control.ControlCollection)
Gets the focused control from the specified control collection by recursively searching through the hierarchy for a control that contains focus.
Declaration
protected virtual Control GetFocusedControl(Control.ControlCollection controls)
Parameters
|
System.Windows.Forms.Control.ControlCollection
controls
The control collection to search for focused controls. |
Returns
|
System.Windows.Forms.Control
The focused control, or null if no focused control is found. |
GetInitialItemsOffset(RectangleF)
Gets the initial offset for positioning items within the client rectangle, based on the current scrolling position and layout requirements.
Declaration
protected override float GetInitialItemsOffset(RectangleF clientRect)
Parameters
|
System.Drawing.RectangleF
clientRect
The client rectangle for item positioning. |
Returns
|
System.Single
The initial offset value for item layout. |
Overrides
GetItemsRect()
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.
Declaration
public override RectangleF GetItemsRect()
Returns
|
System.Drawing.RectangleF
The rectangle area available for positioning explorer bar items. |
Overrides
GetNCMetrics()
Gets the non-client area metrics including border thickness and header/footer dimensions, with processing controlled by the allowNCCALCSIZEProcessing flag.
Declaration
protected override Padding GetNCMetrics()
Returns
|
System.Windows.Forms.Padding
The padding representing the non-client area metrics. |
Overrides
GetNextFocusedControl(Control.ControlCollection, Int32, Int32)
Gets the next focused control from the control collection based on tab index navigation, supporting both forward and backward navigation through controls.
Declaration
protected virtual Control GetNextFocusedControl(Control.ControlCollection controls, int currentTabIndex, int step)
Parameters
|
System.Windows.Forms.Control.ControlCollection
controls
The control collection to search for the next focusable control. |
|
System.Int32
currentTabIndex
The current tab index as reference point. |
|
System.Int32
step
The step direction for navigation (positive for forward, negative for backward). |
Returns
|
System.Windows.Forms.Control
The next control to focus based on tab order, or null if none found. |
GetPeekPopupArrowDirection()
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.
Declaration
protected override ArrowDirection GetPeekPopupArrowDirection()
Returns
|
ArrowDirection
The ArrowDirection for peek popup positioning. |
Overrides
InitializeFields()
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.
Declaration
protected override void InitializeFields()
Overrides
IsChildElementExternal(RadElement)
Determines whether the specified element is considered external to the normal child element hierarchy, excluding the scrollbar from external element checks.
Declaration
protected override bool IsChildElementExternal(RadElement element)
Parameters
|
RadElement
element
The element to check for external status. |
Returns
|
System.Boolean
True if the element is external (excluding the scrollbar); otherwise, false. |
Overrides
IsNextKey(Keys)
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.
Declaration
protected override bool IsNextKey(Keys key)
Parameters
|
System.Windows.Forms.Keys
key
The key to check for next navigation. |
Returns
|
System.Boolean
True if the key represents next navigation for the current orientation; otherwise, false. |
Overrides
IsPreviousKey(Keys)
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.
Declaration
protected override bool IsPreviousKey(Keys key)
Parameters
|
System.Windows.Forms.Keys
key
The key to check for previous navigation. |
Returns
|
System.Boolean
True if the key represents previous navigation for the current orientation; otherwise, false. |
Overrides
MeasureContentArea(ref SizeF)
Measures the content area by measuring the scrollbar and returns empty size since content areas are handled individually for each explorer bar item.
Declaration
protected override SizeF MeasureContentArea(ref SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available size for content area measurement. |
Returns
|
System.Drawing.SizeF
Empty size as content areas are managed per item in explorer bar view. |
Overrides
MeasureItems(SizeF)
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.
Declaration
protected override SizeF MeasureItems(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available size for measuring items. |
Returns
|
System.Drawing.SizeF
The desired size for all measured items combined. |
Overrides
OnBoundsChanged(RadPropertyChangedEventArgs)
Handles bounds changes by checking if non-client area metrics have changed and refreshing the non-client area accordingly to maintain proper visual layout.
Declaration
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
Parameters
|
RadPropertyChangedEventArgs
e
The event arguments containing information about the bounds change. |
Overrides
OnContentBoundsChanged()
Handles content bounds changes by updating the bounds of all visible pages to match their associated content area elements, ensuring proper page layout synchronization.
Declaration
protected override void OnContentBoundsChanged()
Overrides
OnExpandedChanged(RadPageViewExpandedChangedEventArgs)
Raises the ExpandedChanged event when an explorer bar item's expanded state changes, allowing subscribers to respond to expansion and collapse operations.
Declaration
protected virtual void OnExpandedChanged(RadPageViewExpandedChangedEventArgs e)
Parameters
|
RadPageViewExpandedChangedEventArgs
e
The event arguments containing information about the expanded state change. |
OnItemCollapsing(RadPageViewExplorerBarItem)
Handles the collapsing event for an explorer bar item by raising the appropriate events and allowing cancellation of the collapse operation.
Declaration
protected virtual bool OnItemCollapsing(RadPageViewExplorerBarItem item)
Parameters
|
RadPageViewExplorerBarItem
item
The explorer bar item that is about to collapse. |
Returns
|
System.Boolean
True if the collapse should be cancelled; otherwise, false. |
OnItemExpanding(RadPageViewExplorerBarItem)
Handles the expanding event for an explorer bar item by raising the appropriate events and allowing cancellation of the expansion operation.
Declaration
protected virtual bool OnItemExpanding(RadPageViewExplorerBarItem item)
Parameters
|
RadPageViewExplorerBarItem
item
The explorer bar item that is about to expand. |
Returns
|
System.Boolean
True if the expansion should be cancelled; otherwise, false. |
OnItemMouseUp(RadPageViewItem, MouseEventArgs)
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.
Declaration
protected override void OnItemMouseUp(RadPageViewItem sender, MouseEventArgs e)
Parameters
|
RadPageViewItem
sender
The explorer bar item that received the mouse up event. |
|
System.Windows.Forms.MouseEventArgs
e
The mouse event arguments containing button and position information. |
Overrides
OnLoaded()
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.
Declaration
protected override void OnLoaded()
Overrides
OnMouseWheel(MouseEventArgs)
Handles mouse wheel events by translating wheel movements into scrollbar value changes, enabling smooth scrolling through the explorer bar items.
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
|
System.Windows.Forms.MouseEventArgs
e
The mouse event arguments containing wheel delta information. |
Overrides
OnNCPaint(Graphics)
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.
Declaration
protected override void OnNCPaint(Graphics g)
Parameters
|
System.Drawing.Graphics
g
The graphics context for non-client area painting. |
Overrides
OnPageAdded(RadPageViewEventArgs)
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.
Declaration
protected override void OnPageAdded(RadPageViewEventArgs e)
Parameters
|
RadPageViewEventArgs
e
The event arguments containing information about the added page. |
Overrides
OnPageRemoved(RadPageViewEventArgs)
Handles page removal by disposing of the associated content area element and cleaning up the item-to-content relationship for the explorer bar view.
Declaration
protected override void OnPageRemoved(RadPageViewEventArgs e)
Parameters
|
RadPageViewEventArgs
e
The event arguments containing information about the removed page. |
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property change events, with special handling for stack position changes to update scrollbar parameters and ensure proper layout orientation.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
|
RadPropertyChangedEventArgs
e
The event arguments containing information about the changed property. |
Overrides
OnSelectedPageChanged(RadPageViewEventArgs)
Handles selected page changes by refreshing the non-client area to ensure proper visual updates when the selected explorer bar item changes.
Declaration
protected override void OnSelectedPageChanged(RadPageViewEventArgs e)
Parameters
|
RadPageViewEventArgs
e
The event arguments containing information about the page change. |
Overrides
PageWithFocusedControl()
Finds the explorer bar item that contains a control with focus by checking all items for focused controls within their page control collections.
Declaration
protected virtual RadPageViewStackItem PageWithFocusedControl()
Returns
|
RadPageViewStackItem
The stack item containing a focused control, or null if none found. |
PaintBorder(IGraphics, Single, SizeF)
Overrides border painting to disable default border rendering for the explorer bar view, as borders are handled through the non-client area painting mechanism.
Declaration
protected override void PaintBorder(IGraphics graphics, float angle, SizeF scale)
Parameters
|
IGraphics
graphics
The graphics context for painting operations. |
|
System.Single
angle
The rotation angle for painting transformations. |
|
System.Drawing.SizeF
scale
The scale factor for painting operations. |
Overrides
PerformArrange(RectangleF)
Performs the arrangement of elements by correcting the client rectangle for scrollbar space, arranging content and items, and updating scrollbar positioning.
Declaration
protected override RectangleF PerformArrange(RectangleF clientRect)
Parameters
|
System.Drawing.RectangleF
clientRect
The client rectangle for element arrangement. |
Returns
|
System.Drawing.RectangleF
The corrected client rectangle after scrollbar adjustments. |
Overrides
ProcessAutoScroll(Control, Boolean)
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.
Declaration
protected virtual void ProcessAutoScroll(Control activeControl, bool ensureVisibility)
Parameters
|
System.Windows.Forms.Control
activeControl
The control to make visible through scrolling. |
|
System.Boolean
ensureVisibility
Whether to force scrolling even if the control appears to be visible. |
ProcessKeyDown(KeyEventArgs)
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.
Declaration
protected override void ProcessKeyDown(KeyEventArgs e)
Parameters
|
System.Windows.Forms.KeyEventArgs
e
The key event arguments containing information about the pressed key. |
Overrides
ScrollToControl(Control)
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.
Declaration
public virtual void ScrollToControl(Control control)
Parameters
|
System.Windows.Forms.Control
control
The control to scroll to and focus. |
ScrollToItem(RadPageViewExplorerBarItem)
Scrolls the view to make the specified explorer bar item visible within the client area, adjusting the scrollbar value and layout offset as needed.
Declaration
public virtual bool ScrollToItem(RadPageViewExplorerBarItem item)
Parameters
|
RadPageViewExplorerBarItem
item
The explorer bar item to scroll to. |
Returns
|
System.Boolean
True if scrolling was performed; false if the item is already fully visible or layout info is unavailable. |
SetItemIndex(Int32, Int32)
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.
Declaration
protected override void SetItemIndex(int currentIndex, int newIndex)
Parameters
|
System.Int32
currentIndex
The current index of the item to move. |
|
System.Int32
newIndex
The new index where the item should be positioned. |
Overrides
SetSelectedContent(RadPageViewItem)
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.
Declaration
protected override void SetSelectedContent(RadPageViewItem item)
Parameters
|
RadPageViewItem
item
The item to set as selected content. |
Overrides
SetValueCore(RadPropertyValue, Object, Object, ValueSource)
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.
Declaration
protected override ValueUpdateResult SetValueCore(RadPropertyValue propVal, object propModifier, object newValue, ValueSource source)
Parameters
|
RadPropertyValue
propVal
The property value container. |
|
System.Object
propModifier
The property modifier object. |
|
System.Object
newValue
The new value to set. |
|
ValueSource
source
The source of the value change. |
Returns
|
ValueUpdateResult
The result of the value update operation. |
Overrides
UpdateAndArrangeScrollbar(RectangleF)
Updates scrollbar metrics and arranges the scrollbar within the client rectangle, managing scrollbar visibility based on content overflow and correcting layout offsets as needed.
Declaration
protected virtual void UpdateAndArrangeScrollbar(RectangleF clientRect)
Parameters
|
System.Drawing.RectangleF
clientRect
The client rectangle for scrollbar arrangement. |
UpdateScrollbarMetrics(RectangleF)
Updates the scrollbar metrics including large change, minimum, and maximum values based on the client rectangle dimensions and full layout length calculations.
Declaration
protected virtual void UpdateScrollbarMetrics(RectangleF clientRect)
Parameters
|
System.Drawing.RectangleF
clientRect
The client rectangle used for scrollbar metric calculations. |
Events
ExpandedChanged
Occurs when an explorer bar item's expanded state changes, allowing subscribers to respond to expansion and collapse operations.
Declaration
public event EventHandler<RadPageViewExpandedChangedEventArgs> ExpandedChanged
Event Type
|
System.EventHandler<RadPageViewExpandedChangedEventArgs>
|