Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

syncfusion-winforms-form同步融合 winforms 形式

Agent Skill

syncfusion-winforms-form 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

799

周安装

32

GitHub Stars

1

下载量

259
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

用于在 WinForms 应用中快速构建标准窗体界面,支持表单布局与基础控件集成。

  • 适用于需要快速搭建用户输入界面或数据录入场景的桌面应用开发。
  • 通过 GitHub 仓库安装技能后,可在 Codex、Claude 等宿主中调用相关组件生成代码。
  • 安装前需确认是否具备 GitHub 访问权限及项目依赖兼容性,避免引入冲突库。
  • 建议结合具体业务需求验证控件行为,防止自动生成代码导致运行时异常。

SKILL.md

Implementing Windows Forms (SfForm)

The Syncfusion SfForm is an advanced window control for Windows Forms applications that provides complete customization of form appearance, custom user interface in the title bar, and comprehensive MDI (Multiple Document Interface) support.

When to Use This Skill

Use SfForm when you need to:

  • Customize title bar appearance - Colors, text alignment, button styles, custom icons
  • Load custom controls in title bar - Add search boxes, navigation controls, or any user control
  • Build MDI applications - Parent forms with multiple child windows
  • Apply professional themes - Built-in Office 2016/2019 and high contrast themes
  • Customize form borders - Active/inactive states, colors, thickness, rounded corners
  • Add shadow effects - Customizable shadow opacity for modern appearance
  • Support rich text in title bar - Display formatted text in form title
  • Localize form elements - Multi-language support for global applications

SfForm vs MetroForm vs Office2007Form:

  • Use SfForm for modern applications requiring custom title bar controls and full appearance control
  • Use MetroForm if you only need caption images and labels with built-in skins
  • Use Office2007Form for Microsoft Office 2007-style UI with built-in color schemes

Key Features

  • Title Bar Customization - Height, colors, text alignment, button customization
  • User Control Loading - Place any WinForms control in the title bar
  • MDI Support - Complete parent-child form management
  • Border Customization - Active/inactive border colors and thickness
  • Theme Support - 6 built-in professional themes
  • Rich Text Support - RTF formatting in title bar text
  • Shadow Effects - Adjustable shadow opacity
  • Rounded Corners - Windows 11 style rounded corners
  • Localization - Full resource file support

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly deployment and dependencies
  • Converting standard Form to SfForm
  • Basic setup and initialization
  • Initial customization examples
  • Loading user controls to title bar

Title Bar Customization

📄 Read: references/titlebar-customization.md

  • Adjusting title bar height
  • Text alignment (horizontal and vertical)
  • Customizing title bar buttons (icons, colors, states)
  • Hiding buttons (minimize, maximize, close)
  • Rich text formatting in title bar
  • Loading user controls to title bar
  • Icon and caption customization

Form Customization

📄 Read: references/form-customization.md

  • Setting and aligning form icons
  • Border customization (active/inactive states)
  • Shadow effect configuration
  • Shadow opacity settings
  • Rounded corners (Windows 11+)

MDI Customization

📄 Read: references/mdi-customization.md

  • Creating MDI parent forms
  • Adding MDI child forms
  • Customizing child form appearance
  • Getting active MDI child
  • Key event handling in MDI children

Theming

📄 Read: references/theming.md

  • Loading theme assemblies
  • Applying themes to forms
  • Available themes (Office2016/2019, HighContrast)
  • Theme customization options

Localization

📄 Read: references/localization.md

  • Creating resource files for localization
  • Setting culture and UI culture
  • Localizing at sample level
  • Editing default resource files
  • Different assembly/namespace configurations

Quick Start

Step 1: Add Assembly References

Add the following references to your project:

  • Syncfusion.Core.WinForms.dll
  • Syncfusion.Shared.Base.dll

Step 2: Convert Form to SfForm

using Syncfusion.WinForms.Controls;

namespace MyApplication
{
    public partial class Form1 : SfForm  // Change from Form to SfForm
    {
        public Form1()
        {
            InitializeComponent();

            // Basic customization
            this.Style.TitleBar.BackColor = Color.FromArgb(46, 46, 46);
            this.Style.TitleBar.ForeColor = Color.White;
        }
    }
}

VB.NET:

Imports Syncfusion.WinForms.Controls

Public Class Form1
    Inherits SfForm  ' Change from Form to SfForm

    Public Sub New()
        InitializeComponent()

        ' Basic customization
        Me.Style.TitleBar.BackColor = Color.FromArgb(46, 46, 46)
        Me.Style.TitleBar.ForeColor = Color.White
    End Sub
End Class

Step 3: Customize Appearance

// Title bar button colors
this.Style.TitleBar.CloseButtonForeColor = Color.White;
this.Style.TitleBar.MinimizeButtonForeColor = Color.White;
this.Style.TitleBar.MaximizeButtonForeColor = Color.White;

// Button hover colors
this.Style.TitleBar.CloseButtonHoverBackColor = Color.Red;
this.Style.TitleBar.MinimizeButtonHoverBackColor = Color.DarkGray;
this.Style.TitleBar.MaximizeButtonHoverBackColor = Color.DarkGray;

// Form border
this.Style.Border = new Pen(Color.FromArgb(0, 122, 204), 2);
this.Style.InactiveBorder = new Pen(Color.Gray, 2);

Common Patterns

Pattern 1: Dark Theme Form

public Form1()
{
    InitializeComponent();

    // Dark title bar
    this.Style.TitleBar.BackColor = Color.FromArgb(30, 30, 30);
    this.Style.TitleBar.ForeColor = Color.White;
    this.Style.TitleBar.Height = 35;

    // Button styling
    this.Style.TitleBar.CloseButtonForeColor = Color.White;
    this.Style.TitleBar.CloseButtonHoverBackColor = Color.FromArgb(232, 17, 35);
    this.Style.TitleBar.MinimizeButtonForeColor = Color.White;
    this.Style.TitleBar.MaximizeButtonForeColor = Color.White;

    // Border and shadow
    this.Style.Border = new Pen(Color.FromArgb(0, 122, 204), 2);
    this.Style.ShadowOpacity = 150;

    // Client area
    this.Style.BackColor = Color.FromArgb(45, 45, 48);
}

Pattern 2: Custom Title Bar with Search Control

public Form1()
{
    InitializeComponent();

    // Create search panel
    FlowLayoutPanel searchPanel = new FlowLayoutPanel();
    searchPanel.Size = new Size(250, 28);
    searchPanel.FlowDirection = FlowDirection.LeftToRight;

    // Add search label
    Label searchLabel = new Label();
    searchLabel.Text = "Search:";
    searchLabel.ForeColor = Color.White;
    searchLabel.AutoSize = true;
    searchLabel.Margin = new Padding(5, 5, 5, 0);

    // Add search textbox
    TextBox searchBox = new TextBox();
    searchBox.Width = 180;
    searchBox.Margin = new Padding(5, 2, 0, 0);

    searchPanel.Controls.Add(searchLabel);
    searchPanel.Controls.Add(searchBox);

    // Load to title bar
    this.TitleBarTextControl = searchPanel;

    // Style title bar
    this.Style.TitleBar.BackColor = Color.FromArgb(0, 120, 215);
    this.Style.TitleBar.Height = 35;
}

Pattern 3: MDI Parent with Child Forms

// Parent Form
public class MainForm : SfForm
{
    public MainForm()
    {
        InitializeComponent();

        // Enable MDI container
        this.IsMdiContainer = true;

        // Customize parent appearance
        this.Style.TitleBar.BackColor = Color.FromArgb(0, 122, 204);
        this.Style.TitleBar.ForeColor = Color.White;
    }

    private void CreateChildForm()
    {
        // Create child form
        SfForm childForm = new SfForm();
        childForm.Text = "Child Window 1";
        childForm.MdiParent = this;

        // Customize child appearance
        childForm.Style.TitleBar.BackColor = Color.White;
        childForm.Style.TitleBar.ForeColor = Color.Black;
        childForm.Style.Border = new Pen(Color.LightGray, 1);

        childForm.Show();
    }
}

Pattern 4: Apply Built-in Theme

// In Program.cs
static class Program
{
    [STAThread]
    static void Main()
    {
        // Register Syncfusion license
        Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");

        // Load theme assemblies
        SfSkinManager.LoadAssembly(typeof(Office2016Theme).Assembly);
        SfSkinManager.LoadAssembly(typeof(Office2019Theme).Assembly);

        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new Form1());
    }
}

// In Form
public Form1()
{
    InitializeComponent();

    // Apply theme
    this.ThemeName = "Office2016Colorful";
}

Pattern 5: Localized Form

public Form1()
{
    // Set culture before initialization
    System.Threading.Thread.CurrentThread.CurrentCulture =
        new System.Globalization.CultureInfo("de-DE");
    System.Threading.Thread.CurrentThread.CurrentUICulture =
        new System.Globalization.CultureInfo("de-DE");

    InitializeComponent();
}

Key Properties

Form Properties

  • Style - Access all appearance customization options
  • TitleBarTextControl - Load custom user control to title bar
  • AllowRoundedCorners - Enable Windows 11 style rounded corners (bool)
  • ThemeName - Apply built-in theme (string)
  • IsMdiContainer - Enable MDI parent mode (bool)

TitleBar Properties (Style.TitleBar)

  • Height - Title bar height (int)
  • BackColor - Title bar background color
  • ForeColor - Title bar text color
  • TextHorizontalAlignment - Left, Center, Right
  • TextVerticalAlignment - Top, Center, Bottom
  • IconHorizontalAlignment - Icon horizontal position
  • IconVerticalAlignment - Icon vertical position
  • AllowRichText - Enable RTF formatting (bool)

Button Properties (Style.TitleBar)

  • CloseButtonForeColor - Close button icon color
  • MinimizeButtonForeColor - Minimize button icon color
  • MaximizeButtonForeColor - Maximize button icon color
  • CloseButtonHoverBackColor - Close button hover background
  • CloseButtonPressedBackColor - Close button pressed background
  • CloseButtonImage - Custom close button icon
  • CloseButtonHoverImage - Custom close button hover icon
  • CloseButtonPressedImage - Custom close button pressed icon

Border and Shadow Properties (Style)

  • Border - Active state border (Pen)
  • InactiveBorder - Inactive state border (Pen)
  • ShadowOpacity - Active shadow opacity (0-255)
  • InactiveShadowOpacity - Inactive shadow opacity (0-255)

Common Use Cases

Use Case 1: Modern Application with Custom Title Bar

Scenario: Building a modern desktop application with branding in the title bar Solution: Use TitleBarTextControl to load a panel with logo and navigation controls Reference: titlebar-customization.md

Use Case 2: Document Editor with MDI

Scenario: Creating a text editor that supports multiple open documents Solution: Use MDI parent form with child forms for each document Reference: mdi-customization.md

Use Case 3: Enterprise Application with Consistent Branding

Scenario: Apply company theme across all forms in the application Solution: Use built-in themes or create custom theme with Style properties Reference: theming.md

Use Case 4: Multi-language Application

Scenario: Support multiple languages for international users Solution: Implement localization with resource files Reference: localization.md

Use Case 5: Minimalist Form Design

Scenario: Create clean, distraction-free form with minimal UI Solution: Hide title bar buttons, use custom colors, add subtle shadow Reference: form-customization.md

Comparison with Other Form Controls

FeatureSfFormMetroFormOffice2007Form
Custom Title Bar Controls✅ Yes❌ No❌ No
MDI Support✅ Yes✅ Yes✅ Yes
Active/Inactive Border✅ Yes⚠️ Limited⚠️ Limited
Rich Text Title✅ Yes❌ No❌ No
Shadow Customization✅ Yes❌ No❌ No
Rounded Corners✅ Yes (Win11+)❌ No❌ No
Theme Support✅ 6 themes✅ Built-in skins✅ Office schemes
Caption Images✅ Yes✅ Yes✅ Yes

Recommendation: Use SfForm for maximum flexibility and modern features. Use MetroForm or Office2007Form only for legacy applications or specific style requirements.

Tips and Best Practices

Performance

  • Set all style properties in the constructor before showing the form
  • Use SuspendLayout()/ResumeLayout() when adding multiple controls
  • Dispose of custom images and resources properly

Design

  • Keep title bar height between 30-40 pixels for optimal appearance
  • Use subtle shadows (opacity 100-150) for professional look
  • Ensure sufficient contrast between title bar and buttons
  • Test custom title bar controls at different DPI settings

MDI Applications

  • Set IsMdiContainer = true before creating child forms
  • Apply consistent styling to all child forms
  • Use ActiveMdiChild to manage current child window
  • Consider using menu strip for window management

Theme Usage

  • Load theme assemblies in Program.cs before creating forms
  • Apply consistent theme across all forms in application
  • Test with HighContrast theme for accessibility
  • Avoid mixing themed and non-themed forms

Accessibility

  • Provide sufficient color contrast for title bar text
  • Support keyboard navigation for all custom controls
  • Test with Windows high contrast settings
  • Ensure custom title bar controls are accessible

Troubleshooting

Title bar custom control not visible:

  • Ensure control size fits within title bar height
  • Check control's Visible property is true
  • Verify background colors aren't transparent

Theme not applying:

  • Verify theme assembly is loaded in Program.cs
  • Check theme name spelling (case-sensitive)
  • Ensure ThemeName is set after InitializeComponent()

MDI child not displaying:

  • Verify parent's IsMdiContainer = true
  • Check child's MdiParent is set correctly
  • Ensure child form is shown with .Show() not .ShowDialog()

Border not showing:

  • Verify FormBorderStyle is not None
  • Check Border pen width is > 0
  • Ensure border color contrasts with background

Related Components

  • MetroForm - Alternative form with built-in Metro styling
  • Office2007Form - Alternative form with Office 2007 appearance
  • Ribbon - For Office-style ribbon interface in title bar area
  • SfSkinManager - For applying themes globally

Additional Resources

  • API Reference: SfForm Class Documentation
  • Sample Applications: Check installation directory for complete examples
  • Support: Syncfusion Community Forums

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.32%
按下载量换算86

Claude

30.35%
按下载量换算79

Cursor

20.6%
按下载量换算53

Gemini CLI

9.04%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills