MCPInstall

syncfusion-winforms-card-layout

Implement stack-based card layout management in Windows Forms applications using Syncfusion CardLayout to organize controls as visible cards, navigate between cards, and configure layout modes for wizard controls and property pages.

Installs
77
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-card-layout
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads syncfusion-winforms-card-layout automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Implementing CardLayout in Windows Forms

When to Use This Skill

Use this skill when you need to:

  • Create a stack-based card layout that displays one card (control) at a time
  • Build wizard-style interfaces with sequential card navigation
  • Implement property pages with card switching
  • Organize multiple panels or controls as cards within a container
  • Navigate programmatically between different views or screens

Component Overview

CardLayout is a layout manager that organizes controls in a stack-of-cards appearance. Each control added to the layout becomes a "card," and only one card is visible at a time. The container acts as a stack of cards, with the first component added being initially visible. Cards can be configured with custom names, images, and sizing behavior.

Key Capabilities:

  • Set unique names for each card
  • Navigate between cards (First, Next, Previous, Last)
  • Configure layout modes (Default or Fill)
  • Maintain aspect ratio for child controls
  • Get/set selected card by name or index

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly and NuGet package installation
  • Adding CardLayout via designer or code
  • Creating and configuring container panel
  • Adding child controls as cards
  • Basic card navigation with Next/Previous methods

Configuring CardLayout

📄 Read: references/configuring-cardlayout.md

  • Setting custom card names with SetCardName
  • Getting card names and components
  • Working with card indices (NextCardIndex, PreviousCardIndex)
  • Aspect ratio maintenance (MaintainAspectRatio)
  • Layout modes: Default vs Fill
  • Setting preferred and minimum sizes

Card Navigation

📄 Read: references/card-navigation.md

  • Selecting cards by name using SelectedCard property
  • Navigation methods: First(), Next(), Previous(), Last()
  • Using SmartTag in designer for card selection
  • Code-based navigation with buttons
  • ComboBox integration for card selection
  • Runtime card switching

Child Controls Configuration

📄 Read: references/child-controls.md

  • Adding child controls as cards to the layout
  • Image settings for cards
  • PreferredSize and MinimumSize configuration
  • Container and child control setup
  • Styling child controls

Quick Start Example

using Syncfusion.Windows.Forms.Tools;
using System.Windows.Forms;

public class CardLayoutForm : Form
{
    private CardLayout cardLayout1;
    private Panel cardLayoutPanel;
    private Panel card1;
    private Panel card2;

    public CardLayoutForm()
    {
        // Initialize CardLayout
        cardLayout1 = new CardLayout();
        cardLayoutPanel = new Panel();
        cardLayoutPanel.BackColor = Color.White;
        cardLayoutPanel.Dock = DockStyle.Fill;

        // Set container
        cardLayout1.ContainerControl = cardLayoutPanel;

        // Create cards (panels)
        card1 = new Panel();
        card1.BackColor = Color.LightBlue;
        card1.Controls.Add(new Label { Text = "Card 1", AutoSize = true });

        card2 = new Panel();
        card2.BackColor = Color.LightGreen;
        card2.Controls.Add(new Label { Text = "Card 2", AutoSize = true });

        // Add cards to the main panel
        cardLayoutPanel.Controls.Add(card1);
        cardLayoutPanel.Controls.Add(card2);

        // Set card names
        cardLayout1.SetCardName(card1, "FirstCard");
        cardLayout1.SetCardName(card2, "SecondCard");

        // Navigate between cards
        cardLayout1.SelectedCard = "FirstCard";
        cardLayout1.Next(); // Display SecondCard

        // Add to form
        this.Controls.Add(cardLayoutPanel);
    }
}

Common Patterns

Pattern 1: Wizard Interface

Create sequential steps where users navigate forward/backward through cards:

private void NextButton_Click(object sender, EventArgs e)
{
    this.cardLayout1.Next();
}

private void PreviousButton_Click(object sender, EventArgs e)
{
    this.cardLayout1.Previous();
}

Pattern 2: Dropdown Card Selection

Allow users to select cards from a dropdown list:

private void CardSelectionComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
    string selectedCardName = CardSelectionComboBox.SelectedItem.ToString();
    this.cardLayout1.SelectedCard = selectedCardName;
}

Pattern 3: Fill Container

Make cards stretch to fill the entire container:

this.cardLayout1.LayoutMode = CardLayoutMode.Fill;

Key Properties

PropertyTypeDescription
SelectedCardstringGets/sets the current visible card by name
LayoutModeCardLayoutModeGets/sets layout mode (Default or Fill)
NextCardIndexintReturns the index of the next card
PreviousCardIndexintReturns the index of the previous card
ContainerControlControlGets/sets the container for the layout

Key Methods

MethodPurpose
First()Display the first card
Next()Display the next card
Previous()Display the previous card
Last()Display the last card
SetCardName(Control, string)Assign a custom name to a card
GetCardName(Control)Get the name of a card
GetCardNames()Get all card names as array
GetComponentFromName(string)Get control by card name
SetMaintainAspectRatio(Control, bool)Configure aspect ratio maintenance

FAQ

What does the syncfusion-winforms-card-layout skill do?

Implement stack-based card layout management in Windows Forms applications using Syncfusion CardLayout to organize controls as visible cards, navigate between cards, and configure layout modes for wizard controls and property pages.

How do I install syncfusion-winforms-card-layout?

Run npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-card-layout in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-winforms-card-layout/ (personal) or .claude/skills/syncfusion-winforms-card-layout/ (project).

Which AI agents can use syncfusion-winforms-card-layout?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is syncfusion-winforms-card-layout safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains syncfusion-winforms-card-layout?

It is published by syncfusion in syncfusion/winforms-ui-components-skills. It has 77 recorded installs.

More from syncfusion/winforms-ui-components-skills

View all →

syncfusion-winforms-datagrid

syncfusion/winforms-ui-components-skills

Implements Syncfusion WinForms SfDataGrid component for displaying and managing tabular data in Windows Forms applications. Use this when working with data grids, column management (auto-generation, stacked headers), data operations (filtering, sorting, grouping), or grid editing with validation. The skill covers data summaries, selection modes, export capabilities (Excel/PDF), conditional styling, master-detail views, and drag-and-drop functionality.

syncfusion-winforms-button

syncfusion/winforms-ui-components-skills

Guide developers to implement and customize the Syncfusion Windows Forms SfButton control for desktop applications. Use this when creating interactive buttons with text, images, styling, and theming in Windows Forms applications. Covers implementation, customization, and interaction handling.

syncfusion-winforms-common

syncfusion/winforms-ui-components-skills

Comprehensive guide for implementing Syncfusion Essential Studio Windows Forms (WinForms) controls in desktop applications. Use this skill when working with Syncfusion WinForms components or Essential Studio WinForms. Covers WinForms installation, localization, high DPI support, and .NET Core compatibility. Helps with adding controls, registering license keys, and troubleshooting WinForms component issues.

syncfusion-winforms-contextmenustrip

syncfusion/winforms-ui-components-skills

Implement ContextMenuStripEx enhanced context menus in Windows Forms applications. Use this when working with context menus, right-click functionality, or popup menus with custom items. Covers menu configuration, multi-level menus, keyboard shortcuts, and appearance customization in WinForms.

syncfusion-winforms-listview

syncfusion/winforms-ui-components-skills

Guide for implementing Syncfusion SfListView control in Windows Forms for creating list-based UIs with data binding, grouping, sorting, filtering, and selection capabilities. Use when building applications with item collections, Explorer views, contact lists, or product catalogs with sortable/filterable lists. Covers data binding, checkbox lists, grouped lists, filtered lists, and rich data display for list interfaces.

syncfusion-winforms-docking-manager

syncfusion/winforms-ui-components-skills

Guide to implement Syncfusion WinForms DockingManager control for Visual Studio-style dockable windows and layouts. Use this when creating docked, floating, or tabbed windows with advanced layout management. Covers dock states, auto-hide functionality, caption customization, and serialization in WinForms applications.

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs