New to Telerik UI for WinForms? Start a free 30-day trial

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:

C#
public abstract class RadItemsControl : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, IItemsControl

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadItemsControl...

Derived Classes: RadMenu

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIDisposableIDropTargetIItemsControlILayoutHandlerINotifyPropertyChangedISupportInitializeISupportInitializeNotificationISynchronizeInvokeIWin32Window...

Inherited Members RadControl.isResizing2RadControl.isDisposing2RadControl.invalidResizeRectRadControl.isAccessibilityRequestedRadControl.Dispose(bool)RadControl.Construct()RadControl.CreateBehavior()RadControl.CreateRootElement()RadControl.CreateChildItems(RadElement)RadControl.InitializeRootElement(RootRadElement)RadControl.LoadElementTree()RadControl.LoadElementTree(Size)RadControl.SetBackColorThemeOverrides()RadControl.ResetBackColorThemeOverrides()RadControl.SetForeColorThemeOverrides()RadControl.ResetForeColorThemeOverrides()RadControl.OnKeyDown(KeyEventArgs)RadControl.OnKeyUp(KeyEventArgs)RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)RadControl.OnKeyPress(KeyPressEventArgs)RadControl.OnClick(EventArgs)RadControl.OnDoubleClick(EventArgs)RadControl.OnMouseDown(MouseEventArgs)RadControl.OnMouseUp(MouseEventArgs)RadControl.OnMouseEnter(EventArgs)RadControl.OnMouseLeave(EventArgs)RadControl.OnMouseMove(MouseEventArgs)RadControl.OnMouseHover(EventArgs)RadControl.OnMouseWheel(MouseEventArgs)RadControl.OnMouseCaptureChanged(EventArgs)RadControl.OnLostFocus(EventArgs)RadControl.OnCreateControl()RadControl.OnHandleDestroyed(EventArgs)RadControl.OnParentChanged(EventArgs)RadControl.OnVisibleChanged(EventArgs)RadControl.OnFontChanged(EventArgs)RadControl.OnForeColorChanged(EventArgs)RadControl.OnBackColorChanged(EventArgs)RadControl.OnEnabledChanged(EventArgs)RadControl.OnBindingContextChanged(EventArgs)RadControl.OnLocationChanged(EventArgs)RadControl.OnPaddingChanged(EventArgs)RadControl.OnRightToLeftChanged(EventArgs)RadControl.OnPaint(PaintEventArgs)RadControl.OnLayout(LayoutEventArgs)RadControl.OnAutoSizeChanged(EventArgs)RadControl.WndProc(ref Message)RadControl.OnInvalidated(RadElement)RadControl.OnLoad(Size)RadControl.OnCaptureLosing()RadControl.OnThemeChanged()RadControl.OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)RadControl.OnScreenTipNeeded(object, ScreenTipNeededEventArgs)RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)RadControl.ProcessMnemonic(char)RadControl.ProcessFocusRequested(RadElement)RadControl.ProcessCaptureChangeRequested(RadElement, bool)RadControl.ProcessAutoSizeChanged(bool)RadControl.IsInputKey(Keys)RadControl.BeginInit()RadControl.EndInit()RadControl.OnNotifyPropertyChanged(string)RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadControl.GetPreferredSize(Size)RadControl.SetBoundsCore(int, int, int, int, BoundsSpecified)RadControl.GetRootElementDesiredSize(int, int, int, int)RadControl.OnZoomGesture(ZoomGestureEventArgs)RadControl.OnRotateGesture(RotateGestureEventArgs)RadControl.OnPanGesture(PanGestureEventArgs)RadControl.OnTwoFingerTapGesture(GestureEventArgs)RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)RadControl.OnGesture(GestureEventArgs)RadControl.ProcessGesture(Message)RadControl.EnableGesture(GestureType)RadControl.DisableGesture(GestureType)RadControl.Refresh()RadControl.SuspendUpdate()RadControl.ResumeUpdate()RadControl.ResumeUpdate(bool)RadControl.InvokeLayoutCallback(LayoutCallback)RadControl.RegisterHostedControl(RadHostItem)RadControl.UnregisterHostedControl(RadHostItem, bool)RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)RadControl.GetPlainText()RadControl.ShouldSerializeProperty(RadProperty)RadControl.ShouldSerializeProperty(RadProperty, RadObject)RadControl.ResetProperty(RadProperty, RadObject)RadControl.CanEditElementAtDesignTime(RadElement)RadControl.ProcessCodedUIMessage(ref IPCMessage)RadControl.FindPropertyInChildren(RadControl, IPCMessage)RadControl.ScaleControl(SizeF, BoundsSpecified)RadControl.PerformRadAutoScale(BoundsSpecified?)RadControl.GetMonitorDpiScaleFactor(Control)RadControl.SetRadAutoScale(bool)RadControl.EnableDpiScalingRadControl.EnableRadAutoScaleRadControl.EnableRadFormInitialDpiScalingRadControl.EnableImageDpiScalingRadControl.EnableSvgImagesRadControl.IsLoadedRadControl.ElementTreeRadControl.UseCompatibleTextRenderingDefaultValueRadControl.BehaviorRadControl.RootElementRadControl.PaddingRadControl.ThemeNameRadControl.TextRadControl.EnableThemingRadControl.ThemeClassNameRadControl.ImageListRadControl.ImageScalingSizeRadControl.UseCompatibleTextRenderingRadControl.AutoSizeRadControl.MaximumSizeRadControl.MinimumSizeRadControl.FocusableRadControl.SiteRadControl.CausesValidationRadControl.IsInitializingRadControl.SmallImageListRadControl.SmallImageScalingSizeRadControl.IsDesignModeRadControl.IsDisplayedRadControl.FocusedElementRadControl.AllowShowFocusCuesRadControl.ShowItemToolTipsRadControl.CommandBindingsRadControl.EnableKeyMapRadControl.BackColorRadControl.ForeColorRadControl.FontRadControl.ValidationCancelRadControl.EnableAnalyticsRadControl.AnalyticsNameRadControl.EnableRadAccessibilityObjectsRadControl.EnableCodedUITestsRadControl.EnableCodedUITestsDefaultValueRadControl.EnableUIAutomationRadControl.EnableUIAutomationDefaultValueRadControl.ElementInvalidatedRadControl.ToolTipTextNeededRadControl.ScreenTipNeededRadControl.ThemeNameChangedRadControl.InitializedRadControl.PropertyChangedRadControl.ZoomGestureRadControl.RotateGestureRadControl.PanGestureRadControl.TwoFingerTapGestureRadControl.PressAndTapGesture...

Constructors

Initializes a new instance of the RadItemsControl class.

C#
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 a collection containing the items that are currently active.

C#
public virtual RadItemOwnerCollection ActiveItems { get; }

Implements: IItemsControl.ActiveItems

C#
public virtual bool HasKeyboardInput { get; }

Gets the collection of items associated with the IItemsControl.

C#
public abstract RadItemOwnerCollection Items { get; }

Implements: IItemsControl.Items

Gets or sets whether the RadItemsControl processes the keyboard.

C#
[Browsable(false)]
public virtual bool ProcessKeyboard { get; set; }

Implements: IItemsControl.ProcessKeyboard

Gets or sets whether the rollover items functionality of the RadItemsControl will be allowed.

C#
[Browsable(false)]
public virtual bool RollOverItemSelection { get; set; }

Implements: IItemsControl.RollOverItemSelection

Methods

C#
protected virtual bool CallBaseProcessDialogKey(Keys keyData)
Parameters:keyDataKeysReturns:

bool

C#
public void CallOnItemDeselected(ItemSelectedEventArgs args)
Parameters:argsItemSelectedEventArgs

Defines whether the IItemsControl can execute navigation operation based on the keydata provided.

C#
public virtual bool CanNavigate(Keys keyData)
Parameters:keyDataKeys

An instance of the Keys struct that defines the key command issued.

Returns:

bool

True if navigation possible, otherwise false.

Implements: IItemsControl.CanNavigate(Keys)

Defines whether the IItemsControl has an item that corresponds to the mnemonic passed in the parameter.

C#
public virtual bool CanProcessMnemonic(char keyData)
Parameters:keyDatachar

A character that defines the mnemonic command issued.

Returns:

bool

True if mnemonic can be processed, otherwise false.

Implements: IItemsControl.CanProcessMnemonic(char)

C#
protected virtual void ChangeSelection(RadItem nextItem)
Parameters:nextItemRadItem
C#
protected virtual void GetChildMnemonicList(ArrayList mnemonicList)
Parameters:mnemonicListArrayList

Gets the first visible item from the collection. In a IItemsControl that is the first item that is visible on the control.

C#
public virtual RadItem GetFirstVisibleItem()
Returns:

RadItem

A reference to a RadItem instance that represents the first visible control.

Implements: IItemsControl.GetFirstVisibleItem()

C#
protected override RadElement GetInputElement()
Returns:

RadElement

Overrides: RadControl.GetInputElement()

When overridden in a derived class, creates and returns the implementation object that provides the specific behavior for this items control.

C#
protected virtual IItemsControl GetItemsControlImpl()
Returns:

IItemsControl

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 last visible item from the collection. In a IItemsControl that is the last item that is visible on the control.

C#
public virtual RadItem GetLastVisibleItem()
Returns:

RadItem

A reference to a RadItem instance that represents the last visible control.

Implements: IItemsControl.GetLastVisibleItem()

Gets an item from the collection that is next to a certain item.

C#
public virtual RadItem GetNextItem(RadItem item, bool forward)
Parameters:itemRadItem

The item which neighbour to return.

forwardbool

The direction in which to look for the neighbour.

Returns:

RadItem

A reference to a RadItem instance which represents the neighbour item.

Implements: IItemsControl.GetNextItem(RadItem, bool)

Returns the selected item in the control.

C#
public virtual RadItem GetSelectedItem()
Returns:

RadItem

An reference to a RadItem instance which represents the currently selected item.

Implements: IItemsControl.GetSelectedItem()

C#
protected override void OnGotFocus(EventArgs e)
Parameters:eEventArgs

Overrides: RadControl.OnGotFocus(EventArgs)

C#
protected virtual bool OnHandleKeyDown(Message m)
Parameters:mMessageReturns:

bool

C#
protected virtual void OnItemDeselected(ItemSelectedEventArgs args)
Parameters:argsItemSelectedEventArgs
C#
protected virtual void OnItemSelected(ItemSelectedEventArgs args)
Parameters:argsItemSelectedEventArgs
C#
protected virtual bool ProcessArrowKey(Keys keyCode)
Parameters:keyCodeKeysReturns:

bool

C#
protected override bool ProcessCmdKey(ref Message m, Keys keyData)
Parameters:mMessagekeyDataKeysReturns:

bool

Overrides: Control.ProcessCmdKey(ref Message, Keys)

C#
protected override bool ProcessDialogKey(Keys keyData)
Parameters:keyDataKeysReturns:

bool

Overrides: Control.ProcessDialogKey(Keys)

C#
protected virtual bool ProcessLeftRightArrowKey(bool right)
Parameters:rightboolReturns:

bool

C#
protected virtual bool ProcessTabKey(bool forward)
Parameters:forwardboolReturns:

bool

C#
protected virtual bool ProcessUpDownArrowKey(bool down)
Parameters:downboolReturns:

bool

C#
protected override void Select(bool directed, bool forward)
Parameters:directedboolforwardbool

Overrides: Control.Select(bool, bool)

Selects the first visible item on the IItemsControl.

C#
public virtual RadItem SelectFirstVisibleItem()
Returns:

RadItem

A reference to a RadItem instance that represents the item selected.

Implements: IItemsControl.SelectFirstVisibleItem()

Selects an item in the control.

C#
public virtual void SelectItem(RadItem item)
Parameters:itemRadItem

A reference to a RadItem instance which represents the item which is to be selected.

Implements: IItemsControl.SelectItem(RadItem)

Selects the last visible item on the IItemsControl.

C#
public virtual RadItem SelectLastVisibleItem()
Returns:

RadItem

A reference to a RadItem instance that represents the item selected.

Implements: IItemsControl.SelectLastVisibleItem()

Selects an item from the collection that is next to a certain item.

C#
public virtual RadItem SelectNextItem(RadItem item, bool forward)
Parameters:itemRadItem

The item which neighbour to return.

forwardbool

The direction in which to look for the neighbour.

Returns:

RadItem

A reference to a RadItem instance which represents the neighbour item.

Implements: IItemsControl.SelectNextItem(RadItem, bool)

Events

Occurs when an item becomes deselected in the control.

C#
public event ItemSelectedEventHandler ItemDeselected

Implements: IItemsControl.ItemDeselected

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.

C#
public event ItemSelectedEventHandler ItemSelected

Implements: IItemsControl.ItemSelected

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.