Class RadItemsControlImpl
Represents an encapsulated implementation of the IItemsControl interface. Provides core functionality for item selection, navigation, and keyboard processing in controls that manage collections of RadItem objects.
Inheritance
Inherited Members
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll
Syntax
public class RadItemsControlImpl : IItemsControl
Remarks
This implementation handles item selection logic, keyboard navigation, and selection events for controls that work with RadItem collections. It supports rollover selection for circular navigation and provides methods for finding and selecting items based on visibility and selectability.
Constructors
RadItemsControlImpl(RadItemOwnerCollection)
Initializes a new instance of the RadItemsControlImpl class.
Declaration
public RadItemsControlImpl(RadItemOwnerCollection items)
Parameters
RadItemOwnerCollection
items
The collection of items to manage. |
Properties
ActiveItems
Gets the collection of active items. This is an alias for the Items property.
Declaration
public RadItemOwnerCollection ActiveItems { get; }
Property Value
RadItemOwnerCollection
The collection of active RadItem objects. |
Implements
Items
Gets the collection of items managed by this control implementation.
Declaration
public RadItemOwnerCollection Items { get; }
Property Value
RadItemOwnerCollection
The RadItemOwnerCollection containing all managed items. |
Implements
ProcessKeyboard
Gets or sets a value indicating whether the control should process keyboard input.
Declaration
public bool ProcessKeyboard { get; set; }
Property Value
System.Boolean
|
Implements
RollOverItemSelection
Gets or sets a value indicating whether item selection should roll over from the last item to the first item (and vice versa) during navigation.
Declaration
public bool RollOverItemSelection { get; set; }
Property Value
System.Boolean
|
Implements
Methods
CanNavigate(Keys)
CanProcessMnemonic(Char)
Determines whether the control can process the specified mnemonic character.
Declaration
public bool CanProcessMnemonic(char keyData)
Parameters
System.Char
keyData
The mnemonic character to check. |
Returns
System.Boolean
Always returns false in the current implementation. |
Implements
GetFirstVisibleItem()
Gets the first visible and selectable item in the collection.
Declaration
public RadItem GetFirstVisibleItem()
Returns
RadItem
The first visible and selectable RadItem, or null if none exists. |
Implements
GetLastVisibleItem()
Gets the last visible and selectable item in the collection.
Declaration
public RadItem GetLastVisibleItem()
Returns
RadItem
The last visible and selectable RadItem, or null if none exists. |
Implements
GetNextItem(RadItem, Boolean)
Gets the next selectable item in the collection relative to the specified item.
Declaration
public RadItem GetNextItem(RadItem item, bool forward)
Parameters
RadItem
item
The reference item to navigate from, or null to get the first item. |
System.Boolean
forward
True to navigate forward, false to navigate backward. |
Returns
RadItem
The next selectable item, or null if no suitable item is found. |
Implements
Remarks
If RollOverItemSelection is enabled, navigation will wrap around to the beginning/end when reaching the last/first item respectively.
GetSelectedItem()
Gets the currently selected item.
Declaration
public RadItem GetSelectedItem()
Returns
RadItem
The currently selected RadItem, or null if no item is selected. |
Implements
SelectFirstVisibleItem()
Selects the first visible and selectable item in the collection.
Declaration
public RadItem SelectFirstVisibleItem()
Returns
RadItem
The selected RadItem, or null if no suitable item exists. |
Implements
SelectItem(RadItem)
Selects the specified item and raises appropriate selection events.
Declaration
public void SelectItem(RadItem item)
Parameters
RadItem
item
The item to select. |
Implements
Remarks
If a different item was previously selected, the ItemDeselected event is raised for the old item before selecting the new item and raising the ItemSelected event.
SelectLastVisibleItem()
Selects the last visible and selectable item in the collection.
Declaration
public RadItem SelectLastVisibleItem()
Returns
RadItem
The selected RadItem, or null if no suitable item exists. |
Implements
SelectNextItem(RadItem, Boolean)
Selects the next item in the specified direction relative to the current item.
Declaration
public RadItem SelectNextItem(RadItem item, bool forward)
Parameters
RadItem
item
The current item to navigate from. |
System.Boolean
forward
True to select the next item, false to select the previous item. |
Returns
RadItem
The newly selected item, or null if no suitable item was found. |
Implements
Events
ItemDeselected
Occurs when an item is deselected.
Declaration
public event ItemSelectedEventHandler ItemDeselected
Event Type
ItemSelectedEventHandler
|
Implements
ItemSelected
Occurs when an item is selected.
Declaration
public event ItemSelectedEventHandler ItemSelected
Event Type
ItemSelectedEventHandler
|