CardListViewElement
Provides the card-view list implementation that shares a card template and synchronizes its layout with each data item.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class CardListViewElement : IconListViewElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementScrollViewElement<VirtualizedStackContainer<ListViewDataItem>>VirtualizedScrollPanel<ListViewDataItem, BaseListViewVisualItem>BaseListViewElementIconListViewElementCardListViewElement...
Implements:
Inherited Members
Constructors
Initializes card-view list behavior and subscribes to the owner's binding and column changes.
public CardListViewElement(RadListViewElement owner)
The list-view element whose columns and data items are rendered as cards.
Properties
Gets or sets a value indicating whether the items can have different height.
public override bool AllowArbitraryItemHeight { get; set; }
Overrides:
Gets or sets a value indicating whether the items can have different width.
public override bool AllowArbitraryItemWidth { get; set; }
Overrides:
Gets the mapping from card-template item names to the data-field names they display.
protected IDictionary<string, string> BoundItems { get; }
Gets the layout control used as a template for all displayed cards.
public RadLayoutControl CardTemplate { get; }
Gets the card view element.
public RadCardViewElement CardViewElement { get; }
The card view element.
CollapsedGroupsDictionary
IDictionary<ListViewDataItem, List<string>>
Gets the collapsed group names remembered for each data item so each card can retain its own expansion state.
protected IDictionary<ListViewDataItem, List<string>> CollapsedGroupsDictionary { get; }
Gets or sets the context menu.
public RadDropDownMenu DropDownMenu { get; set; }
Gets or sets the default item size.
public override Size ItemSize { get; set; }
Overrides:
ItemSynchronizationProperties
IList<RadProperty>
Gets the item synchronization properties.
public static IList<RadProperty> ItemSynchronizationProperties { get; }
The item synchronization properties.
Gets the serialization info for RadLayoutControl used by Save/Load layout methods to persist the layout to/from XML. By default or when set to null the ComponentXmlSerializationInfo provided by GetDefaultXmlSerializationInfo() will be used.
[Browsable(false)]
public ComponentXmlSerializationInfo XmlSerializationInfo { get; set; }
Methods
Closes the customize dialog.
public void CloseCustomizeDialog()
Synchronizes given CardViewContainerElement to the container of CardTemplate.
protected virtual void CompareContainers(CardViewContainerElement cardViewContainer, CardListViewVisualItem visualItem)
The given container.
visualItemCardListViewVisualItemThe visual item that owns the container.
Reconciles per-card layout items with the shared template by matching generated names, preserving order, creating missing items, and removing items no longer in the template.
protected virtual void CompareItems(RadItemCollection layoutContainerItems, RadItemCollection cardViewContainerItems, CardListViewVisualItem visualItem)
The items in the shared card template.
cardViewContainerItemsRadItemCollectionThe per-card item collection to reconcile.
visualItemCardListViewVisualItemThe card visual that owns the per-card container.
Creates a card field item that preserves the template item's field and label-sizing settings.
protected virtual CardViewItem CreateCardViewItem(CardViewItem originalItem)
The card field item in the shared template.
Returns:A card-specific field item with the same binding and text-layout settings.
Creates the customization menu and sets the initial card size.
protected override void CreateChildElements()
Overrides:
Creates the provider that supplies card visual items for data rows.
protected override IVirtualizedElementProvider<ListViewDataItem> CreateElementProvider()
IVirtualizedElementProvider<ListViewDataItem>
A virtualized element provider for card-view data items.
Overrides:
Creates a card group, copies its header and expansion settings, and recursively creates its child items.
protected virtual LayoutControlGroupItem CreateGroupItem(LayoutControlGroupItem originalItem, CardListViewVisualItem visualItem)
The group in the shared template.
visualItemCardListViewVisualItemThe card visual used while creating child items.
Returns:A group containing card-specific counterparts of the template's child items.
Creates the per-card label counterpart; common text and image values are copied after this factory returns.
protected virtual LayoutControlLabelItem CreateLabelItem(LayoutControlLabelItem originalItem)
The label item in the shared template.
Returns:A label item for the card-specific container.
Creates a per-card counterpart for a supported template item and passes it through the item-creating event.
protected virtual LayoutControlItemBase CreateNewItem(LayoutControlItemBase originalItem, CardListViewVisualItem visualItem)
The item in the shared card template.
visualItemCardListViewVisualItemThe card visual for which the counterpart is created.
Returns:The created item, the event-provided replacement, or null when the item type is unsupported or canceled.
Creates a per-card separator and preserves the template separator's thickness.
protected virtual LayoutControlSeparatorItem CreateSeparatorItem(LayoutControlSeparatorItem originalItem)
The separator in the shared template.
Returns:A separator for the card-specific container.
Creates a per-card splitter and copies its orientation-specific images and thickness from the template.
protected virtual LayoutControlSplitterItem CreateSplitterItem(LayoutControlSplitterItem originalItem)
The splitter in the shared template.
Returns:A splitter for the card-specific container.
Creates a card-specific tabbed group, clones its child groups, and preserves the selected group.
protected virtual LayoutControlTabbedGroup CreateTabbedGroup(LayoutControlTabbedGroup originalItem, CardListViewVisualItem visualItem)
The tabbed group in the shared template.
visualItemCardListViewVisualItemThe card visual used while creating child groups.
Returns:A tabbed group containing card-specific child groups.
Unsubscribes from owner and template events and disposes the owned context-menu objects.
protected override void DisposeManagedResources()
Overrides:
Gets all child items.
public virtual List<LayoutControlItemBase> GetAllChildItems(RadItemCollection items)
The items.
Returns:List<LayoutControlItemBase>
Gets the default serialization info for RadLayoutControl used by Save/Load layout methods to persist the layout to/from XML.
protected virtual ComponentXmlSerializationInfo GetDefaultXmlSerializationInfo()
The default serialization info.
Initializes the items of the default context menu.
protected virtual void InitializeDropDownMenu()
Loads CardTemplate's layout state from XML file, using the serialization information provided by the XmlSerializationInfo property.
public virtual void LoadCardTemplateLayout(Stream stream)
The stream to read from.
Loads CardTemplate's layout state from XML file, using the serialization information provided by the XmlSerializationInfo property.
public virtual void LoadCardTemplateLayout(string fileName)
The file to read from.
Loads CardTemplate's layout state from XML file, using the serialization information provided by the XmlSerializationInfo property.
public virtual void LoadCardTemplateLayout(XmlReader xmlReader)
The XmlReader to read the XML from.
Rechecks the generated template for unbound cards and refreshes the card-template layout after loading.
protected override void OnLoaded()
Overrides:
Shows the customization menu on a permitted right-click; otherwise delegates mouse-down handling to the base list.
protected override void OnMouseDown(MouseEventArgs e)
The mouse button and location for the interaction.
Overrides:
Suppresses base right-click handling when the customization menu is available.
protected override void OnMouseUp(MouseEventArgs e)
The mouse button and location for the release.
Overrides:
Rebuilds generated card-template items when their fields no longer match the owner's columns or bound fields. Clears the template when no fields are available and leaves matching template items intact.
protected virtual void ResetCardTemplate()
Stores CardTemplate's layout state in XML format, using the serialization information provided by the XmlSerializationInfo property.
public virtual void SaveCardTemplateLayout(Stream stream)
The stream to write to.
Stores CardTemplate's layout state in XML format, using the serialization information provided by the XmlSerializationInfo property.
public virtual void SaveCardTemplateLayout(string fileName)
The file to write to.
Stores CardTemplate's layout state in XML format, using the serialization information provided by the XmlSerializationInfo property.
public virtual void SaveCardTemplateLayout(XmlWriter xmlWriter)
XmlWriter to use by the built-in serializer
Shows the customize dialog.
public void ShowCustomizeDialog()
Copies theme-level property values from a template item to its card-specific counterpart without replacing local values.
protected virtual void SynchronizeItemProperties(LayoutControlItemBase originalItem, LayoutControlItemBase item)
The item in the shared card template.
itemLayoutControlItemBaseThe corresponding item in a card's container.
Updates item bounds and synchronizes properties.
protected virtual void UpdateItemProperties(LayoutControlItemBase originalItem, LayoutControlItemBase item, CardListViewVisualItem visualItem)
Updates the items layout.
public virtual void UpdateItemsLayout()