RadItemsControl
Provides an abstract base class for RadControls that manage collections of RadItem objects, offering item selection, event handling, and collection management capabilities.
RadItemsControl serves as the foundation for controls that work with collections of interactive items such as list boxes, combo boxes, menus, toolbars, and tree views. It provides a unified programming model for item-based controls through the IItemsControl interface.
The class manages item selection state through ItemSelected and ItemDeselected events, coordinates with implementation objects for specialized behavior, and provides infrastructure for item collection management. It delegates specific functionality to implementation classes while maintaining a consistent public interface.
Derived classes include RadListControl, RadComboBox, RadMenu, and other controls that need to manage collections of selectable or interactive items with consistent behavior patterns and event handling throughout the Telerik WinControls framework.
Definition
Namespace:Telerik.WinControls
Assembly:Telerik.WinControls.dll
Syntax:
public abstract class RadItemsControl : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, IItemsControl
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadItemsControl...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadItemsControl class.
public RadItemsControl()
The constructor establishes the implementation pattern by creating an items control implementation object and wiring up the necessary event handlers for item selection and deselection events.
Properties
Gets the items considered by the control's selection and navigation implementation. The default implementation uses the same collection as Items.
public virtual RadItemOwnerCollection ActiveItems { get; }
Implements:
Gets whether this control or one of its child controls currently has focus.
public virtual bool HasKeyboardInput { get; }
Gets the collection of items supplied by the derived control.
public abstract RadItemOwnerCollection Items { get; }
Implements:
Gets or sets whether the RadItemsControl processes the keyboard.
[Browsable(false)]
public virtual bool ProcessKeyboard { get; set; }
Implements:
Gets or sets whether the rollover items functionality of the RadItemsControl will be allowed.
[Browsable(false)]
public virtual bool RollOverItemSelection { get; set; }
Implements:
Methods
Invokes the virtual hook for an item-deselection notification.
public void CallOnItemDeselected(ItemSelectedEventArgs args)
The item that was deselected.
Determines whether the configured item implementation supports navigation with the specified key. The default implementation reports that it does not.
Determines whether the configured item implementation can handle the specified mnemonic. The default implementation reports that it cannot.
Moves focus to a hosted control when the next item is a RadHostItem; otherwise, focuses this control if focus is within it.
protected virtual void ChangeSelection(RadItem nextItem)
The item being selected.
Adds the mnemonic character from each active item's text to the supplied list.
protected virtual void GetChildMnemonicList(ArrayList mnemonicList)
The list to receive mnemonic characters.
Returns the selected item as the current input element.
protected override RadElement GetInputElement()
The selected item, or null when there is no selection.
Overrides:
When overridden in a derived class, creates and returns the implementation object that provides the specific behavior for this items control.
protected virtual IItemsControl GetItemsControlImpl()
An IItemsControl implementation that handles the specific behavior for this control type.
This factory method allows derived classes to specify their own implementation objects while maintaining the common RadItemsControl interface and event handling patterns. The default implementation returns a RadItemsControlImpl instance.
Gets the next visible, selectable item in the active collection.
public virtual RadItem GetNextItem(RadItem item, bool forward)
The item to navigate from, or null to start from the first item.
forwardbooltrue to search forward; otherwise, search backward.
Returns:The next eligible item, or null if none is found.
Implements:
When RollOverItemSelection is enabled, navigation wraps at the ends of the collection.
Moves focus to the selected item when the control receives focus.
Provides a subclass hook after the ItemDeselected event is raised.
protected virtual void OnItemDeselected(ItemSelectedEventArgs args)
The item that was deselected.
Provides a subclass hook after the ItemSelected event is raised.
protected virtual void OnItemSelected(ItemSelectedEventArgs args)
The item that was selected.
Offers command keys to the selected item, then to other active items, before the base control processes them.
Routes dialog keys to the selected item and, when enabled, handles item navigation and tab traversal.
Selects an item through the configured implementation.
public virtual void SelectItem(RadItem item)
The item to select, or null to clear the selection.
Implements:
The default implementation raises ItemDeselected for a different previous item before raising ItemSelected for a non-null item.
Selects the next visible, selectable item in the specified direction.
public virtual RadItem SelectNextItem(RadItem item, bool forward)
The item to navigate from.
forwardbooltrue to search forward; otherwise, search backward.
Returns:The newly selected item, or null if no eligible item is found.
Implements:
This changes the selection but does not itself move keyboard focus to the item.
Events
Occurs when an item becomes deselected in the control.
public event ItemSelectedEventHandler ItemDeselected
Implements:
This event is raised whenever an item transitions from a selected to an unselected state, providing notification of deselection changes to enable cleanup operations and user interface state management.
Occurs when an item becomes selected in the control.
public event ItemSelectedEventHandler ItemSelected
Implements:
This event is raised whenever an item transitions from an unselected to a selected state, providing notification of selection changes to enable responsive user interface updates and business logic execution.