RadCardView
RadCardView is control that layouts its items as cards based on CardLayout property.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Data.dll
Syntax:
[TelerikToolboxCategory("Data")]
public class RadCardView : Control
Inheritance: objectRadCardView
Constructors
Initializes a new instance of the Telerik.Windows.Controls.RadCardView class.
public RadCardView()
Fields
AutoGenerateDataFieldDescriptorsProperty
DependencyProperty
Identifies the AutoGenerateDataFieldDescriptors dependency property.
public static readonly DependencyProperty AutoGenerateDataFieldDescriptorsProperty
CanUserSelectProperty
DependencyProperty
Identifies the CanUserSelect dependency property.
public static readonly DependencyProperty CanUserSelectProperty
CanUserSortDescriptorsProperty
DependencyProperty
Identifies the CanUserSortDescriptors dependency property.
public static readonly DependencyProperty CanUserSortDescriptorsProperty
CanUserSortGroupsProperty
DependencyProperty
Identifies the CanUserSortGroups dependency property.
public static readonly DependencyProperty CanUserSortGroupsProperty
CardBeginningEditEvent
RoutedEvent
Identifies the CardBeginningEdit routed event.
public static readonly RoutedEvent CardBeginningEditEvent
CardDataFieldBeginningEditEvent
RoutedEvent
Identifies the CardDataFieldBeginningEdit routed event.
public static readonly RoutedEvent CardDataFieldBeginningEditEvent
CardDataFieldEditEndedEvent
RoutedEvent
Identifies the CardDataFieldEditEnded routed event.
public static readonly RoutedEvent CardDataFieldEditEndedEvent
CardDataFieldPreparedEditorEvent
RoutedEvent
Identifies the CardDataFieldPreparedEditor routed event.
public static readonly RoutedEvent CardDataFieldPreparedEditorEvent
CardDataFieldValidatedEvent
RoutedEvent
Identifies the CardDataFieldValidated routed event.
public static readonly RoutedEvent CardDataFieldValidatedEvent
CardDataFieldValidatingEvent
RoutedEvent
Identifies the CardDataFieldValidating routed event.
public static readonly RoutedEvent CardDataFieldValidatingEvent
CardEditEndedEvent
RoutedEvent
Identifies the CardEditEnded routed event.
public static readonly RoutedEvent CardEditEndedEvent
CardEditEndingEvent
RoutedEvent
Identifies the CardEditEnding routed event.
public static readonly RoutedEvent CardEditEndingEvent
CardEditTemplateProperty
DependencyProperty
Identifies the CardEditTemplate dependency property.
public static readonly DependencyProperty CardEditTemplateProperty
CardHeaderTemplateProperty
DependencyProperty
Identifies the Telerik.Windows.Controls.RadCardView.CardHeaderTemplate dependency property.
public static readonly DependencyProperty CardHeaderTemplateProperty
CardLayoutProperty
DependencyProperty
Identifies the Telerik.Windows.Controls.RadCardView.CardLayout dependency property.
public static readonly DependencyProperty CardLayoutProperty
CardMarginProperty
DependencyProperty
Identifies the Telerik.Windows.Controls.RadCardView.CardMargin dependency property.
public static readonly DependencyProperty CardMarginProperty
CardReadOnlyTemplateProperty
DependencyProperty
Identifies the CardReadOnlyTemplate dependency property.
public static readonly DependencyProperty CardReadOnlyTemplateProperty
CardValidatingEvent
RoutedEvent
Identifies the CardValidating routed event.
public static readonly RoutedEvent CardValidatingEvent
CellLoadedEvent
RoutedEvent
Identifies the CellLoaded routed event.
public static readonly RoutedEvent CellLoadedEvent
CellUnloadedEvent
RoutedEvent
Identifies the CellUnloaded routed event.
public static readonly RoutedEvent CellUnloadedEvent
CollapsedLengthProperty
DependencyProperty
Identifies the Telerik.Windows.Controls.RadCardView.CollapsedLength dependency property.
public static readonly DependencyProperty CollapsedLengthProperty
ControlPanelItemsProperty
DependencyProperty
Identifies the ControlPanelItems dependency property.
public static readonly DependencyProperty ControlPanelItemsProperty
DataFieldDescriptorsButtonVisibilityProperty
DependencyProperty
Identifies the DataFieldDescriptorsButtonVisibility dependency property.
public static readonly DependencyProperty DataFieldDescriptorsButtonVisibilityProperty
DataFieldDescriptorsProperty
DependencyProperty
Identifies the DataFieldDescriptors dependency property.
public static readonly DependencyProperty DataFieldDescriptorsProperty
FilteredEvent
RoutedEvent
Occurs after filtering.
public static readonly RoutedEvent FilteredEvent
FilteringDropDownStaysOpenProperty
DependencyProperty
Identifies the FilteringDropDownStaysOpen dependency property.
public static readonly DependencyProperty FilteringDropDownStaysOpenProperty
FilteringEvent
RoutedEvent
Occurs before filtering.
public static readonly RoutedEvent FilteringEvent
GroupedEvent
RoutedEvent
Occurs after grouping was performed.
public static readonly RoutedEvent GroupedEvent
GroupingEvent
RoutedEvent
Occurs while grouping is being performed. (Cancelable).
public static readonly RoutedEvent GroupingEvent
GroupItemIndentationProperty
DependencyProperty
Identifies the GroupItemIndentation dependency property.
public static readonly DependencyProperty GroupItemIndentationProperty
GroupPanelBackgroundProperty
DependencyProperty
Identifies the GroupPanelBackground dependency property.
public static readonly DependencyProperty GroupPanelBackgroundProperty
GroupPanelForegroundProperty
DependencyProperty
Identifies the GroupPanelForeground dependency property.
public static readonly DependencyProperty GroupPanelForegroundProperty
GroupPanelItemStyleProperty
DependencyProperty
Identifies the GroupPanelItemStyle dependency property.
public static readonly DependencyProperty GroupPanelItemStyleProperty
GroupPanelStyleProperty
DependencyProperty
Identifies the GroupPanelStyle dependency property.
public static readonly DependencyProperty GroupPanelStyleProperty
IsFilteringAllowedProperty
DependencyProperty
Identifies the IsFilteringAllowedProperty dependency property.
public static readonly DependencyProperty IsFilteringAllowedProperty
IsReadOnlyProperty
DependencyProperty
Identifies the IsReadOnly dependency property.
public static readonly DependencyProperty IsReadOnlyProperty
IsSynchronizedWithCurrentItemProperty
DependencyProperty
Identifies the IsSynchronizedWithCurrentItem dependency property.
public static readonly DependencyProperty IsSynchronizedWithCurrentItemProperty
ItemsSourceProperty
DependencyProperty
Identifies the Telerik.Windows.Controls.RadCardView.ItemsSource dependency property.
public static readonly DependencyProperty ItemsSourceProperty
MajorLengthProperty
DependencyProperty
Identifies the Telerik.Windows.Controls.RadCardView.MajorLength dependency property.
public static readonly DependencyProperty MajorLengthProperty
MinorLengthProperty
DependencyProperty
Identifies the Telerik.Windows.Controls.RadCardView.MinorLength dependency property.
public static readonly DependencyProperty MinorLengthProperty
SelectedItemProperty
DependencyProperty
Represents the SelectedItem dependency property.
public static readonly DependencyProperty SelectedItemProperty
SelectionChangedEvent
RoutedEvent
Identifies the SelectionChanged routed event.
public static readonly RoutedEvent SelectionChangedEvent
ShowCardDataFieldDescriptorSortIndexesProperty
DependencyProperty
Identifies the ShowCardDataFieldDescriptorSortIndexes dependency property.
public static readonly DependencyProperty ShowCardDataFieldDescriptorSortIndexesProperty
ShowGroupPanelProperty
DependencyProperty
Identifies the ShowGroupPanel dependency property.
public static readonly DependencyProperty ShowGroupPanelProperty
SortedEvent
RoutedEvent
Occurs after sorting was performed.
public static readonly RoutedEvent SortedEvent
SortingEvent
RoutedEvent
Identifies the Sorting routed event.
public static readonly RoutedEvent SortingEvent
Properties
Gets or sets whether fields in the cards of the Telerik.Windows.Controls.RadCardView are generated automatically.
public bool AutoGenerateDataFieldDescriptors { get; set; }
Gets or sets a value indicating whether the user can select card view items.
public bool CanUserSelect { get; set; }
true if user can select; otherwise, false.
Gets or sets a value that indicates whether the user can sort.
public bool CanUserSortDescriptors { get; set; }
You can set this behavior for individual CardDataFieldDescriptor by setting the CardDataFieldDescriptor.AllowSorting property. If the CardDataFieldDescriptor.AllowSorting property and the RadCardView.CanUserSort property are both set, a value of false will take precedence over a value of true.
Gets or sets a value indicating whether this instance can user sort groups.
public bool CanUserSortGroups { get; set; }
true if this instance can user sort groups; otherwise, false.
CardEditTemplate
DataTemplate
Gets or sets the template that should be applied to cards when the card view is in edit mode.
public DataTemplate CardEditTemplate { get; set; }
CardHeaderBinding
Binding
Gets or sets the data binding for the card header.
public Binding CardHeaderBinding { get; set; }
CardHeaderTemplate
DataTemplate
Gets or sets the DataTemplate that will be applied for the Header of the CardItem.
public DataTemplate CardHeaderTemplate { get; set; }
Gets or sets whether cards are layout in rows or columns.
public CardLayout CardLayout { get; set; }
CardMargin
Thickness
Gets or sets the margin around each card.
public Thickness CardMargin { get; set; }
CardReadOnlyTemplate
DataTemplate
Gets or sets the template that should be applied to cards when the card view is not in edit mode.
public DataTemplate CardReadOnlyTemplate { get; set; }
Gets or sets the collapsed length of a card.
public double CollapsedLength { get; set; }
Gets or sets the control panel items.
public ObservableCollection<IControlPanelItem> ControlPanelItems { get; set; }
Gets the collection that contains all the data field descriptors.
public CardDataFieldDescriptorCollection DataFieldDescriptors { get; }
DataFieldDescriptorsButtonVisibility
Visibility
Gets or sets a value that indicates whether the data field descriptors button is visible.
public Visibility DataFieldDescriptorsButtonVisibility { get; set; }
CardDataFieldDescriptors button visibility.
Gets or sets the property which controls whether the filtering dropdowns stay open when a click outside of the popups occurs.
true if the popups will stay open, otherwise, false
public bool FilteringDropDownStaysOpen { get; set; }
Gets or sets the indentation length for the nested group items.
public double GroupItemIndentation { get; set; }
GroupPanelBackground
Brush
Gets or sets the color behind the content of the GroupPanel.
public Brush GroupPanelBackground { get; set; }
The group panel background.
GroupPanelForeground
Brush
Gets or sets the foreground color of the GroupPanel.
public Brush GroupPanelForeground { get; set; }
The group panel foreground.
GroupPanelItemStyle
Style
Gets or sets the group panel cell style.
public Style GroupPanelItemStyle { get; set; }
The group panel cell style.
GroupPanelStyle
Style
Gets or sets the group panel style.
public Style GroupPanelStyle { get; set; }
The group panel style.
Gets a value indicating whether the control is currently in edit mode.
public bool IsEditing { get; }
Gets or sets a value indicating whether the control can be filtered through the UI.
public bool IsFilteringAllowed { get; set; }
true if the control can be filtered through the UI; otherwise, false.
Gets or sets whether fields in the cards of the Telerik.Windows.Controls.RadCardView can be edited.
public bool IsReadOnly { get; set; }
Gets or sets whether the current item is synchronized with the current item of the source collection.
public bool IsSynchronizedWithCurrentItem { get; set; }
Gets or sets a collection used to generate the cards of the Telerik.Windows.Controls.RadCardView.
public IEnumerable ItemsSource { get; set; }
Gets the keyboard command provider.
public IKeyboardCommandProvider KeyboardCommandProvider { get; set; }
The keyboard command provider. This class provides command key mappings.
Gets or sets the major dimension of a card. Major dimension is the dimension in which cards are scrolled. When CardLayout is Rows, MajorLength is card width, otherwise it is height.
public double MajorLength { get; set; }
Gets or sets the minor dimension of a card. Minor dimension is the opposite dimension in which cards are scrolled. When CardLayout is Rows, MinorLength is card height, otherwise it is width.
public double MinorLength { get; set; }
Gets all pending commands.
public List<ICommand> PendingCommands { get; }
The pending commands.
Gets the selected card view item.
public object SelectedItem { get; set; }
Gets or sets a value indicating whether dataFieldDescriptor sort indexes are displayed.
public bool ShowCardDataFieldDescriptorSortIndexes { get; set; }
A value indicating whether dataFieldDescriptor sort indexes are displayed.
Gets or sets a value indicating whether to show a group panel.
public bool ShowGroupPanel { get; set; }
Methods
Collapse item or group.
Executes all pending commands in a sequence.
public void ExecutePendingCommand()
Expands item or group.
Returns distinct values for a given cardDataFieldDescriptor.
public IEnumerable GetDistinctValues(CardDataFieldDescriptor cardDataFieldDescriptor, bool filter, int? maximumValueCount)
The cardDataFieldDescriptor.
filterboolA value indicating whether to filter the distinct values base on other cardDataFieldDescriptors' existing filters.
maximumValueCountint?The maximum amount of distinct values to return. If you specify null for this parameter, then all distinct values will be returned.
Returns:An IEnumerable containing the distinct values.
The 'filter' parameter specifies whether distinct values should be filtered according to other cardDataFieldDescriptors' active filters. For example, if we have countries and players and we have filtered by CountryX, when we request all distinct players, if 'filter' is true we will get players from CountryX only. If 'filter' is false we will get all distinct players.
Returns the first 1000 distinct values for the given cardDataFieldDescriptor.
public IEnumerable GetDistinctValues(CardDataFieldDescriptor cardDataFieldDescriptor, bool filter)
The cardDataFieldDescriptor.
filterboolA value indicating whether to filter the distinct values based on other cardDataFieldDescriptors' existing filters.
Returns:An IEnumerable containing the distinct values.
The 'filter' parameter specifies whether distinct values should be filtered according to other cardDataFieldDescriptors' active filters. For example, if we have countries and players and we have filtered by CountryX, when we request all distinct players, if 'filter' is true we will get players from CountryX only. If 'filter' is false we will get all distinct players.
Invoked when ApplyTemplate is called.
public override void OnApplyTemplate()
Fires the AutoGeneratingDataFieldDescriptor event.
protected virtual void OnAutoGeneratingDataFieldDescriptor(CardViewAutoGeneratingDataFieldDescriptorEventArgs e)
OnCreateAutomationPeer()
AutomationPeer
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
The type-specific AutomationPeer implementation.
Called when the CardViewGroupPanel is changed.
protected virtual void OnGroupPanelChanged(CardViewGroupPanel oldPanel, CardViewGroupPanel newPanel)
The old panel.
newPanelCardViewGroupPanelThe new panel.
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnKeyDown(KeyEventArgs e)
protected override void OnMouseDown(MouseButtonEventArgs e)
Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnPreviewMouseWheel(MouseWheelEventArgs e)
Scrolls the card containing the data item into view.
Events
Occurs before a data field descriptor is auto-generated and added to the DataFieldDescriptors collection.
public event EventHandler<CardViewAutoGeneratingDataFieldDescriptorEventArgs> AutoGeneratingDataFieldDescriptor
Occurs before an edit operation is started.
public event EventHandler<CardViewItemCancelEventArgs> CardBeginningEdit
Occurs before a card's data field is edited.
public event EventHandler<CardDataFieldCancelEventArgs> CardDataFieldBeginningEdit
Occurs after a card's data field is edited.
public event EventHandler<CardDataFieldEditEndedEventArgs> CardDataFieldEditEnded
Occurs when a card's data field editor is prepared for editing.
public event EventHandler<CardDataFieldPreparedEditorEventArgs> CardDataFieldPreparedEditor
Occurs after a card's data field is validated.
public event EventHandler<CardDataFieldValidatedEventArgs> CardDataFieldValidated
Occurs before a card's data field is validated.
public event EventHandler<CardDataFieldValidatingEventArgs> CardDataFieldValidating
Occurs after an edit operation is finished.
public event EventHandler<CardViewEditEndedEventArgs> CardEditEnded
Occurs before an edit operation is finished.
public event EventHandler<CardViewEditEndingEventArgs> CardEditEnding
Occurs when a card is being validated.
public event EventHandler<CardViewItemCancelEventArgs> CardValidating
Occurs when the CardDataFieldDescriptor distinct values is about to be loaded.
public event EventHandler<CardViewDistinctValuesLoadingEventArgs> DistinctValuesLoading
Occurs when a field filter editor has been created. This event allows you to modify certain properties of the editor.
public event EventHandler<CardViewFilterEditorCreatedEventArgs> FieldFilterEditorCreated
Occurs after filter operation.
public event EventHandler<CardViewFilteredEventArgs> Filtered
Occurs before filter operation.
public event EventHandler<CardViewFilteringEventArgs> Filtering
Occurs before the filter operators of the filtering control are loaded. Use this event if you want to remove one or more of the filter operators or if you want to change the one selected by default.
public event EventHandler<FilterOperatorsLoadingEventArgs> FilterOperatorsLoading
Occurs after grouping was performed.
public event EventHandler<CardViewGroupedEventArgs> Grouped
Occurs while grouping is performed. (Cancelable).
public event EventHandler<CardViewGroupingEventArgs> Grouping
SelectionChanged
SelectionChangedEventHandler
Occurs when the selected card view item has changed.
public event SelectionChangedEventHandler SelectionChanged
Occurs after sorted was performed.
public event EventHandler<CardViewSortedEventArgs> Sorted
Occurs before RadCardView performs sorting.
public event EventHandler<CardViewSortingEventArgs> Sorting