RadListVisualItem
Renders a RadListDataItem and keeps its display properties and selection state synchronized with the data item.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadListVisualItem : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IVirtualizedElement<RadListDataItem>
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadListVisualItem...
Derived Classes:
Implements:
Inherited Members
Constructors
public RadListVisualItem()
Fields
Identifies the visual item's active state, which is bound to Active.
public static RadProperty ActiveProperty
Identifies whether this visual item occupies an odd position for alternating-item styling.
public static RadProperty IsOddProperty
Identifies the visual item's selected state, which is bound to Selected.
public static RadProperty SelectedProperty
Properties
Gets whether the associated data item is the active item in its list.
public bool Active { get; }
Gets whether this visual item may receive the alternating-item background override.
protected virtual bool CanApplyAlternatingColor { get; }
Gets the data item currently represented by this visual item.
public RadListDataItem Data { get; protected set; }
Implements:
Gets or sets a value indicating whether this item has odd position.
public virtual bool IsOdd { get; set; }
Gets the properties copied from each data item to its visual item; derived visual items can add properties to this list.
protected static List<RadProperty> SynchronizationProperties { get; }
Methods
Associates this visual item with data, binds its active and selected states, and synchronizes its appearance.
public virtual void Attach(RadListDataItem data, object context)
The list data item to render.
contextobjectVirtualization context, not used by this implementation.
Implements:
Updates the visual item and raises list formatting when a property on its associated data item changes.
protected virtual void DataPropertyChanged(object sender, RadPropertyChangedEventArgs e)
The data item that raised the property change.
eRadPropertyChangedEventArgsThe changed property and its old and new values.
Removes the data-item bindings and event subscription established by Attach(RadListDataItem, object).
public virtual void Detach()
Implements:
Configures the visual item for list interaction, including ellipsis, drag-and-drop, and mouse capture.
protected override void InitializeFields()
Overrides:
Determines whether this visual item can render the specified data item; description-text items use a specialized visual item.
public virtual bool IsCompatible(RadListDataItem data, object context)
The data item to check.
contextobjectVirtualization context, not used by this implementation.
Returns:true unless data is a DescriptionTextListDataItem.
Implements:
Notifies for a change in the Parent value.
protected override void OnParentChanged(RadElement previousParent)
The previous parent element (if any)
Overrides:
Provides a derived visual item a hook immediately after a synchronization property is copied.
protected virtual void PropertySynchronized(RadProperty property)
The property that was synchronized.
Provides a derived visual item a hook immediately before a synchronization property is copied.
protected virtual void PropertySynchronizing(RadProperty property)
The property about to be synchronized.
Removes the theme overrides used to apply alternating-item coloring.
protected void ResetAlternatingItemColor()
Copies the associated item's display properties, reapplies alternating-item styling, and raises list formatting.
public virtual void Synchronize()
Implements:
Copies the data item's text and registered synchronization properties, resetting visual values not locally set on the data item.
protected virtual void SynchronizeProperties()
Applies or resets alternating row color of the current visual item.
protected virtual void UpdateAlternatingItemColor()