mcpField
S
syncfusion-wpf-card-view

syncfusion-wpf-card-view

github.com/syncfusionDesign & UI5163 installsUpdated 1w ago
Repository

About syncfusion-wpf-card-view

A skill for using Syncfusion CardView in WPF to present bound data as cards. It covers grouping, sorting, filtering, inline editing, templates, themes, and localization; interactive data operations require ItemsSource binding.

Key features

  1. 01Display bound items as cards
  2. 02Group, sort, and filter items
  3. 03Edit card contents inline
  4. 04Customize header, body, and edit templates
  5. 05Configure themes and localization

Use cases

  1. 01Present a collection in a WPF card layout
  2. 02Organize cards by grouped fields
  3. 03Let users sort, filter, or edit bound items
  4. 04Adapt card templates and strings

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/syncfusion/wpf-ui-components-skills --skill syncfusion-wpf-card-view

After installing, type/syncfusion-wpf-card-viewin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
data-binding-and-templates.md
editing.md
getting-started.md
grouping.md
localization.md
sorting-and-filtering.md

Details

From the project README

Implementing CardView (WPF)

A panel control that organizes items as visual cards with built-in grouping, sorting, filtering, and inline editing.

When to Use This Skill

Use this skill when the user needs to:

  • Display a collection of data items as cards in a WPF application
  • Enable grouping, sorting, or filtering of card items
  • Add inline editing to card items (F2 / double-click)
  • Customize card header, body, or edit UI via templates
  • Bind card items to an ObservableCollection (MVVM)
  • Apply themes or localize CardView strings

Note: Grouping, sorting, filtering, and editing require ItemsSource data binding. These features do not work with declarative CardViewItem children.


Component Overview

ClassNamespacePurpose
CardViewSyncfusion.Windows.Tools.ControlsContainer panel for card items
CardViewItemSyncfusion.Windows.Tools.ControlsIndividual card (declarative use)

Required Assemblies: Syncfusion.Shared.WPF + Syncfusion.Tools.WPF

XAML Namespace:

xmlns:syncfusion="http://schemas.syncfusion.com/wpf"

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly and namespace setup
  • Add CardView via designer, XAML, or C#
  • Declarative CardViewItem approach
  • ItemsSource data binding approach
  • SelectedItem, IsSelected, SelectedItemChanged
  • Orientation (Horizontal / Vertical)
  • SfSkinManager theme setup
Data Binding & Templates

📄 Read: references/data-binding-and-templates.md

  • Full Model + ViewModel + ObservableCollection pattern
  • HeaderTemplate — card header display
  • ItemTemplate — card body in view mode
  • EditItemTemplate — card body in edit mode
  • ItemContainerStyle and ItemContainerStyleSelector
  • FlowDirection for RTL layouts
  • SfSkinManager visual styles reference
Grouping

📄 Read: references/grouping.md

  • CanGroup enable/disable
  • Drag-drop fields to group header
  • GroupCards(string) programmatic grouping
  • Nested / multi-level grouping
  • ShowHeader to hide the grouping region
Sorting & Filtering

📄 Read: references/sorting-and-filtering.md

  • CanSort enable/disable; click field name to cycle sort order
  • Sorting grouped items via drop region
  • Filtering via popup-based field value selection (enabled when ShowHeader="True")
  • Clear Filter button behavior
  • ShowHeader to hide sorting/filtering header
Editing

📄 Read: references/editing.md

  • CanEdit enable/disable (default false)
  • F2 / double-click to enter edit mode; Esc/Enter to exit
  • EditItemTemplate requirement and pattern
  • BeginEdit() / EndEdit() programmatic control
  • Custom edit UI styling
Localization

📄 Read: references/localization.md

  • CurrentUICulture setup
  • Resource file naming convention
  • Name/Value pair configuration
  • French culture example

Quick Start Example

Minimal CardView with data binding and grouping/sorting:

<!-- MainWindow.xaml -->
<Window xmlns:syncfusion="http://schemas.syncfusion.com/wpf">
    <Window.DataContext>
        <local:ViewModel/>
    </Window.DataContext>
    <syncfusion:CardView ItemsSource="{Binding CardViewItems}"
                         CanGroup="True"
                         CanSort="True"
                         Name="cardView">
        <syncfusion:CardView.HeaderTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FirstName}"/>
            </DataTemplate>
        </syncfusion:CardView.HeaderTemplate>
        <syncfusion:CardView.ItemTemplate>
            <DataTemplate>
                <ListBox ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                    <ListBoxItem>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Name: " FontWeight="Bold"/>
                            <TextBlock Text="{Binding FirstName}"/>
                        </StackPanel>
                    </ListBoxItem>
                    <ListBoxItem>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Age: " FontWeight="Bold"/>
                            <TextBlock Text="{Binding Age}"/>
                        </StackPanel>
                    </ListBoxItem>
                </ListBox>
            </DataTemplate>
        </syncfusion:CardView.ItemTemplate>
    </syncfusion:CardView>
</Window>
// ViewModel.cs
public class ViewModel : NotificationObject
{
    private ObservableCollection<Person> _items;
    public ObservableCollection<Person> CardViewItems
    {
        get => _items;
        set { _items = value; RaisePropertyChanged(nameof(CardViewItems)); }
    }
    public ViewModel()
    {
        CardViewItems = new ObservableCollection<Person>
        {
            new Person { FirstName = "Alice", LastName = "Smith", Age = 30 },
            new Person { FirstName = "Bob",   LastName = "Jones", Age = 25 },
            new Person { FirstName = "Carol", LastName = "Smith", Age = 28 },
        };
    }
}

Common Patterns

ScenarioProperties / Methods
Enable all interactive modesCanGroup="True" CanSort="True" CanEdit="True"
Programmatic group by fieldcardView.GroupCards("LastName")
Programmatic edit controlcardView.BeginEdit() / cardView.EndEdit()
Hide group/sort/filter headerShowHeader="False"
RTL layoutFlowDirection="RightToLeft"
React to selectionHandle SelectedItemChanged event
Apply themeSfSkinManager.SetVisualStyle(cardView, VisualStyles.FluentLight)

Key Properties

PropertyTypeDefaultDescription
ItemsSourceIEnumerablenullData collection to bind
SelectedItemobjectnullCurrently selected card
OrientationOrientationHorizontalCard layout direction
CanGroupboolfalseEnable drag-drop grouping
CanSortbooltrueEnable field click sorting
CanEditboolfalseEnable inline editing
ShowHeaderbooltrueShow/hide group/sort/filter header
HeaderTemplateDataTemplate—Card header display template
ItemTemplateDataTemplate—Card body in view mode
EditItemTemplateDataTemplate—Card body in edit mode
ItemContainerStyleStyle—Style applied to each card container

Comments

Markdown supported