Token导航 LogoToken导航

Agent Skill · 前端设计

syncfusion-winforms-layout-managers(Synfusion Winforms 布局管理器)

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

syncfusion-winforms-layout-managers 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 5,199。

总安装 720周安装 30GitHub Stars 1下载 240核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-winforms-layout-managers(Synfusion Winforms 布局管理器)
来源仓库:https://github.com/syncfusion/winforms-ui-components-skills
仓库路径:skills/syncfusion-winforms-layout-managers
安装命令:
npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-layout-managers
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-layout-managers

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

整合多种经典布局策略的管理套件,满足不同复杂度的界面编排需求。适合需要同时处理流式、锚定、表格等多种布局混合使用的项目。AI 宿主可利用该技能智能推荐最优布局方案,辅助架构决策过程。混用不同管理器时务必注意 Z-Order 与事件冒泡顺序,避免交互异常。长期维护项目建议建立布局规范文档,确保团队间实现一致性。

来源仓库内路径:skills/syncfusion-winforms-layout-managers

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/syncfusion/winforms-ui-components-skills --ski…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

syncfusion-winforms-layout-managers 怎么安装?

在终端执行 npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfus…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

syncfusion-winforms-layout-managers 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

syncfusion-winforms-layout-managers 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

syncfusion-winforms-layout-managers 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

syncfusion-winforms-layout-managers 用的人多吗?

公开数据是累计安装 720 次,近一周安装 30 次,下载 240 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

syncfusion-winforms-layout-managers 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
syncfusion-winforms-layout-managers

Synfusion Winforms 布局管理器 · 本页

7201只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Implementing Syncfusion WinForms LayoutManagers

The LayoutManagers Package provides five specialized layout managers that automatically arrange child controls within container controls (Panel, Form, etc.) based on specific layout strategies. These managers eliminate manual positioning and provide professional, maintainable layouts.

When to Use This Skill

Use this skill when the user needs to:

  • Automatic Layout Management: Let layout managers position controls instead of manual placement
  • BorderLayout (5-Region Docking): Dock controls to North, South, East, West, or Center positions
  • CardLayout (Wizard/Property Pages): Show one control at a time in a stack (wizards, tabbed content)
  • FlowLayout (Flow Arrangement): Arrange controls horizontally or vertically with automatic wrapping
  • GridLayout (Uniform Grid): Position controls in a uniform grid with equal-sized cells
  • GridBagLayout (Flexible Grid): Create complex layouts with variable cell sizes and control spanning
  • Container-Based Layouts: Apply layouts to Panel, Form, or any ContainerControl
  • Constraint-Based Positioning: Define layout rules instead of absolute coordinates
  • Responsive Layouts: Layouts that adapt when container resizes
  • Professional Forms: Create consistent, maintainable form layouts

Component Overview

The LayoutManagers Package (Syncfusion.Windows.Forms.Tools) provides five layout managers:

1. BorderLayout

Purpose: Dock controls along borders and center (like.NET docking)

Key Features:

  • 5 regions: North, South, East, West, Center
  • Position-based constraints
  • Spacing control (HGap, VGap)
  • Size customization per position

When to use: MDI-style interfaces, dock panels, application shells with header/footer/sidebar

2. CardLayout

Purpose: Show one child control at a time from a stack

Key Features:

  • Stack of cards (only one visible)
  • Navigation (First, Last, Next, Previous)
  • Card naming/identification
  • Layout modes (Default, Fill)
  • Image support per card

When to use: Wizards, property pages, tabbed content without tabs, step-by-step forms

3. FlowLayout

Purpose: Arrange controls in horizontal or vertical flow (MOST COMMONLY USED)

Key Features:

  • Horizontal or vertical layout modes
  • Automatic wrapping
  • Alignment options (Near, Far, Center, ChildConstraints)
  • Per-child constraints (MinSize, PreferredSize)
  • Flow direction (normal, reverse)
  • AutoHeight feature

When to use: Toolbars, button panels, tag lists, responsive content, most general-purpose layouts

4. GridLayout

Purpose: Position controls in a uniform grid

Key Features:

  • Rows and columns configuration
  • Equal-sized cells
  • Automatic child placement
  • Spacing control (HGap, VGap)

When to use: Calculator layouts, button grids, uniform icon panels, simple tabular layouts

5. GridBagLayout

Purpose: Create complex layouts with flexible grid

Key Features:

  • Variable row/column sizes
  • Cell spanning (row and column)
  • Anchor positions (9 options)
  • Fill modes (None, Horizontal, Vertical, Both)
  • Weight-based resizing (WeightX, WeightY)
  • Per-cell padding (Insets)

When to use: Complex forms, dialog boxes, layouts with variable cell sizes, advanced positioning requirements

Key Namespace: Syncfusion.Windows.Forms.Tools

Assembly: Syncfusion.Shared.Base.dll


Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

When to read: User needs to install, understand container concepts, or set up their first layout manager.

Topics covered:

  • Assembly deployment and NuGet packages
  • Container control concept (Panel, Form, ContainerControl)
  • Child control management
  • Adding layout managers via designer
  • Adding layout managers via code
  • Basic setup for all layout types
  • Common settings (spacing, gaps)
  • Layout events

BorderLayout (5-Region Docking)

📄 Read: references/border-layout.md

When to read: User wants to dock controls to borders (North, South, East, West, Center).

Topics covered:

  • BorderLayout overview and position constraints
  • Adding controls to each position
  • Designer vs code approaches
  • SetConstraints method
  • Spacing configuration (HGap, VGap)
  • Size customization per position
  • MDI-style layout example
  • Dock panel example
  • Best practices for border layouts

CardLayout (Wizard/Stack)

📄 Read: references/card-layout.md

When to read: User needs wizards, property pages, or stack-based navigation.

Topics covered:

  • CardLayout overview (one visible card at a time)
  • Card naming and identification
  • Navigation methods (First, Last, Next, Previous, ActivateCard)
  • LayoutMode (Default, Fill)
  • Image settings per card
  • Designer usage (SelectedCard property)
  • Programmatic card management
  • Wizard control implementation
  • Property page implementation
  • Complete wizard example
  • Best practices

FlowLayout (Flow Arrangement)

📄 Read: references/flow-layout.md

When to read: User needs horizontal/vertical flow layouts (MOST COMMON use case).

Topics covered:

  • FlowLayout overview (most versatile)
  • LayoutMode (Horizontal, Vertical)
  • Flow direction (normal, reverse)
  • Alignment options (Near, Far, Center, ChildConstraints)
  • AutoHeight feature for wrapping
  • HGap and VGap spacing
  • Per-child constraints (MinSize, PreferredSize)
  • SetConstraints method
  • Wrapping behavior
  • Horizontal toolbar example
  • Vertical sidebar example
  • Tag list example
  • Advanced constraint scenarios
  • Best practices

GridLayout (Uniform Grid)

📄 Read: references/grid-layout.md

When to read: User needs uniform grid with equal-sized cells.

Topics covered:

  • GridLayout overview
  • Rows and Columns configuration
  • Automatic child placement order
  • HGap and VGap spacing
  • Designer vs code approaches
  • Grid sizing behavior
  • Calculator layout example
  • Button grid example
  • Best practices

GridBagLayout (Flexible Grid)

📄 Read: references/grid-bag-layout.md

When to read: User needs complex layouts with variable cell sizes and control spanning.

Topics covered:

  • GridBagLayout overview (most powerful)
  • Virtual grid concept (variable row/column sizes)
  • GridBagConstraints configuration
  • Anchor property (North, South, East, West, Center, NorthEast, NorthWest, SouthEast, SouthWest)
  • Fill property (None, Horizontal, Vertical, Both)
  • CellSpan (RowSpan, ColSpan)
  • WeightX and WeightY (resize distribution)
  • Insets (cell padding)
  • Form layout example
  • Calculator layout example
  • Advanced spanning scenarios
  • Best practices

Layout Type Selection Guide

Choose your layout based on requirements:

RequirementRecommended LayoutWhy
Dock to borders (header/footer/sidebar)BorderLayoutSimple 5-region positioning
Wizard or multi-step formCardLayoutOne visible card at a time with navigation
Horizontal button toolbarFlowLayout (Horizontal)Auto-wrapping, flexible spacing
Vertical sidebar or listFlowLayout (Vertical)Auto-wrapping, flexible spacing
Calculator or keypadGridLayout or GridBagLayoutUniform grid or flexible grid
Complex form with labels/fieldsGridBagLayoutVariable cell sizes, spanning, alignment
Simple tabular layout (equal cells)GridLayoutUniform rows and columns
General-purpose responsive layoutFlowLayoutMost versatile, widely applicable

Quick Start Examples

BorderLayout: Dock to Borders

using Syncfusion.Windows.Forms.Tools;

// Create BorderLayout
BorderLayout borderLayout = new BorderLayout();
borderLayout.ContainerControl = panel1; // Panel as container

// Create controls for each position
Label northLabel = new Label { Text = "Header", BackColor = Color.LightBlue };
Label southLabel = new Label { Text = "Footer", BackColor = Color.LightGray };
Label eastLabel = new Label { Text = "Right", BackColor = Color.LightYellow };
Label westLabel = new Label { Text = "Left", BackColor = Color.LightGreen };
Panel centerPanel = new Panel { BackColor = Color.White };

// Add controls to container
panel1.Controls.Add(northLabel);
panel1.Controls.Add(southLabel);
panel1.Controls.Add(eastLabel);
panel1.Controls.Add(westLabel);
panel1.Controls.Add(centerPanel);

// Set constraints (position each control)
borderLayout.SetPosition(northLabel, BorderPosition.North)
borderLayout.SetPosition(southLabel, BorderPosition.South);
borderLayout.SetPosition(eastLabel, BorderPosition.East);
borderLayout.SetPosition(westLabel, BorderPosition.West);
borderLayout.SetPosition(centerPanel, BorderPosition.Center);

// Configure spacing
borderLayout.HGap = 5;
borderLayout.VGap = 5;

CardLayout: Wizard Pages

// Create CardLayout
CardLayout cardLayout = new CardLayout();
cardLayout.ContainerControl = panel1;

// Create wizard pages
Panel page1 = new Panel { BackColor = Color.AliceBlue };
Label label1 = new Label { Text = "Step 1: Welcome", Dock = DockStyle.Fill };
page1.Controls.Add(label1);

Panel page2 = new Panel { BackColor = Color.Honeydew };
Label label2 = new Label { Text = "Step 2: Configure", Dock = DockStyle.Fill };
page2.Controls.Add(label2);

Panel page3 = new Panel { BackColor = Color.LavenderBlush };
Label label3 = new Label { Text = "Step 3: Finish", Dock = DockStyle.Fill };
page3.Controls.Add(label3);

// Add pages to container
panel1.Controls.Add(page1);
panel1.Controls.Add(page2);
panel1.Controls.Add(page3);

// Name each card
cardLayout.SetCardName(page1, "Welcome");
cardLayout.SetCardName(page2, "Configure");
cardLayout.SetCardName(page3, "Finish");

// Navigation
cardLayout.LayoutMode = CardLayoutMode.Fill; // Fill container
cardLayout.First();  // Show first card

// Navigate programmatically
// cardLayout.Next();   // Next card
// cardLayout.Previous(); // Previous card
// cardLayout.ActivateCard("Configure"); // Jump to specific card

FlowLayout: Horizontal Toolbar

// Create FlowLayout
FlowLayout flowLayout = new FlowLayout();
flowLayout.ContainerControl = panel1;
flowLayout.LayoutMode = FlowLayoutMode.Horizontal;
flowLayout.Alignment = FlowAlignment.Near;
flowLayout.HGap = 10;
flowLayout.VGap = 5;

// Add buttons
for (int i = 1; i <= 8; i++)
{
    Button btn = new Button { Text = $"Button {i}", Size = new Size(80, 30) };
    panel1.Controls.Add(btn);
}

// Buttons will flow horizontally and wrap to next line automatically

GridLayout: Button Grid

// Create GridLayout (3x3 grid)
GridLayout gridLayout = new GridLayout();
gridLayout.ContainerControl = panel1;
gridLayout.Rows = 3;
gridLayout.Columns = 3;
gridLayout.HGap = 5;
gridLayout.VGap = 5;

// Add 9 buttons (automatic placement in grid)
for (int i = 1; i <= 9; i++)
{
    Button btn = new Button { Text = i.ToString() };
    panel1.Controls.Add(btn);
}

GridBagLayout: Form Layout

// Create GridBagLayout
GridBagLayout gridBagLayout = new GridBagLayout();
gridBagLayout.ContainerControl = panel1;

// Create form controls
Label nameLabel = new Label { Text = "Name:", AutoSize = true };
TextBox nameTextBox = new TextBox { Width = 200 };
Label emailLabel = new Label { Text = "Email:", AutoSize = true };
TextBox emailTextBox = new TextBox { Width = 200 };
Button submitButton = new Button { Text = "Submit" };

// Add to container
panel1.Controls.Add(nameLabel);
panel1.Controls.Add(nameTextBox);
panel1.Controls.Add(emailLabel);
panel1.Controls.Add(emailTextBox);
panel1.Controls.Add(submitButton);

// Create constraints
GridBagConstraints labelConstraints = new new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, AnchorTypes.East, FillType.Horizontal, new Insets(5,5,5,5), 0, 0, false);
labelConstraints.Anchor = GridBagAnchor.East; // Align right

GridBagConstraints fieldConstraints = new GridBagConstraints(1, 0, 1, 1);
fieldConstraints.Fill = GridBagFill.Horizontal;
fieldConstraints.WeightX = 1; // Take extra horizontal space

// Apply constraints
gridBagLayout.SetConstraints(nameLabel, new new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, AnchorTypes.East, FillType.Horizontal, new Insets(5,5,5,5), 0, 0, false));
gridBagLayout.SetConstraints(nameTextBox, new new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, AnchorTypes.East, FillType.Horizontal, new Insets(5,5,5,5), 0, 0, false) {WeightX = 1 });
gridBagLayout.SetConstraints(emailLabel, new new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, AnchorTypes.East, FillType.Horizontal, new Insets(5,5,5,5), 0, 0, false));
gridBagLayout.SetConstraints(emailTextBox, new new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, AnchorTypes.East, FillType.Horizontal, new Insets(5,5,5,5), 0, 0, false){ WeightX = 1 });
gridBagLayout.SetConstraints(submitButton, new new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, AnchorTypes.East, FillType.Horizontal, new Insets(5,5,5,5), 0, 0, false));

Common Patterns

Application Shell (BorderLayout)

// Header + Footer + Sidebar + Content area
BorderLayout borderLayout = new BorderLayout();
borderLayout.ContainerControl = this; // Form as container
borderLayout.HGap = 0;
borderLayout.VGap = 0;

Panel header = new Panel { Height = 60, BackColor = Color.Navy };
Panel footer = new Panel { Height = 30, BackColor = Color.Gray };
Panel sidebar = new Panel { Width = 200, BackColor = Color.LightGray };
Panel content = new Panel { BackColor = Color.White };

this.Controls.AddRange(new Control[] { header, footer, sidebar, content });

borderLayout.SetPosition(header, BorderPosition.North);
borderLayout.SetPosition(footer, BorderPosition.South);
borderLayout.SetPosition(sidebar, BorderPosition.West);
borderLayout.SetPosition(content, BorderPosition.Center);

When to use: Main application window with fixed header/footer and sidebar.

Multi-Step Wizard (CardLayout)

See Quick Start example above. Add Next/Previous buttons to navigate between wizard steps.

Responsive Toolbar (FlowLayout)

See Quick Start example above. Buttons automatically wrap when window resizes.

Login Form (GridBagLayout)

// Labels in column 0, fields in column 1
// Submit button spans both columns
// All elements properly aligned and spaced

See GridBagLayout reference for complete example.


Key Properties

Common to All Layouts

PropertyTypeDescription
ContainerControlControlContainer (Panel, Form) where layout is applied

BorderLayout

PropertyTypeDescription
HGapintHorizontal gap between regions
VGapintVertical gap between regions

CardLayout

PropertyTypeDescription
LayoutModeCardLayoutModeDefault or Fill
SelectedCardControlCurrently visible card (designer)

FlowLayout

PropertyTypeDescription
LayoutModeFlowLayoutModeHorizontal or Vertical
AlignmentFlowAlignmentNear, Far, Center, ChildConstraints
ReverseRowsboolReverse flow direction
AutoHeightboolAuto-adjust height for wrapping
HGapintHorizontal gap between controls
VGapintVertical gap between controls

GridLayout

PropertyTypeDescription
RowsintNumber of rows
ColumnsintNumber of columns
HGapintHorizontal gap between cells
VGapintVertical gap between cells

GridBagLayout

PropertyTypeDescription
*(Constraints set per child)*GridBagConstraintsSee GridBagLayout reference

Common Use Cases

1. Application Main Window

Scenario: Header, footer, sidebar, content area.

  • Use BorderLayout
  • North: Header, South: Footer, West: Sidebar, Center: Content
  • Read: border-layout.md

2. Setup Wizard

Scenario: Multi-step configuration wizard.

  • Use CardLayout
  • Each card is one step, navigate with Next/Previous buttons
  • Read: card-layout.md

3. Toolbar with Auto-Wrapping

Scenario: Horizontal toolbar that wraps to next line.

  • Use FlowLayout (Horizontal mode)
  • Set AutoHeight = true
  • Read: flow-layout.md

4. Calculator Keypad

Scenario: 4x4 button grid.

5. Data Entry Form

Scenario: Labels on left, fields on right.

  • Use GridBagLayout
  • Column 0: Labels (right-aligned), Column 1: Fields (fill horizontal)
  • Read: grid-bag-layout.md

6. Tag Cloud

Scenario: Tags that flow and wrap.

  • Use FlowLayout (Horizontal mode)
  • Add Label controls dynamically
  • Read: flow-layout.md

Events

Common layout event:

  • LayoutComplete - Raised when layout recalculation is complete
flowLayout.LayoutComplete += (sender, e) => {
    // Layout has been recalculated
};

Best Practices

  1. Layout Selection: Use the selection guide above to choose the right layout type
  2. Container Requirements: Always set ContainerControl property (Panel, Form)
  3. Child Addition Order: Add children to container BEFORE setting constraints
  4. FlowLayout for Most Cases: When in doubt, start with FlowLayout (most versatile)
  5. GridBagLayout for Complex Forms: Use for professional data entry forms
  6. Spacing Consistency: Use HGap/VGap for consistent spacing
  7. Designer Support: Use designer for rapid prototyping, code for dynamic layouts
  8. Constraint Objects: Reuse GridBagConstraints objects for similar controls
  9. Testing Resize: Always test layouts with different container sizes
  10. Documentation: Comment constraint configurations for maintainability

See Also

平台分布

Codex

36.05%
按下载量换算87

Claude

28.99%
按下载量换算70

Cursor

18.49%
按下载量换算44

Gemini CLI

9.26%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills