Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计通过

syncfusion-winforms-tabcontrol同步融合 winforms tabcontrol

Agent Skill

syncfusion-winforms-tabcontrol 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

659

周安装

28

GitHub Stars

公开资料未说明

下载量

231
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

Syncfusion WinForms TabControl 选项卡控件,用于在单一窗口内组织多个关联页面。

  • 适用于设置面板、数据视图切换、功能模块分离等需要节省空间的布局需求。
  • 支持选项卡重命名、图标、关闭按钮、拖拽排序及上下文菜单操作。
  • 使用前请确保项目引用了 Syncfusion 基础 TabControl 组件,并检查对 .NET Framework 版本的兼容性。
  • 在动态加载内容时应注意 Dispose 资源管理,防止内存泄漏或控件残留。

SKILL.md

Implementing Tab Controls (TabControlAdv)

The TabControlAdv is an advanced Windows Forms tab control that enables organizing visual content in a compact, tabbed interface. It extends the standard TabControl with extensive appearance customization, navigation features, editing capabilities, and styling options.

When to Use This Skill

Use this skill when you need to:

  • Implement tabbed interfaces in Windows Forms applications
  • Add TabControlAdv with multiple TabPageAdv items
  • Customize tab appearance, colors, fonts, or styles
  • Enable tab editing, drag-and-drop, or close buttons
  • Configure tab navigation with TabPrimitives
  • Handle tab events (selection, closing, editing, etc.)
  • Apply Office, Metro, or Visual Studio themes to tabs
  • Implement scrolling, tooltips, or multi-line tabs
  • Persist tab state (order, active page) across sessions

Component Overview

TabControlAdv provides:

  • Tab Alignment: Top, Bottom, Left, Right positioning
  • Navigation Support: TabPrimitives for first/last/next/previous navigation
  • Editing Support: Runtime tab header text editing
  • Icons Support: Images in tab headers
  • Drag and Drop: Rearrange tabs via drag-and-drop
  • Close Buttons: Individual or global close buttons for tabs
  • ToolTips: Standard and SuperToolTips for tabs
  • Styling: 15+ built-in themes (2D, 3D, Metro, Office, VS styles)
  • Serialization: Save and load tab states
  • Scrolling: Smooth scrolling when tabs overflow

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly deployment and NuGet packages
  • Adding TabControlAdv through designer
  • Adding control manually in code
  • Creating and adding tabs (TabPageAdv)
  • Adding controls to tab pages
  • Basic tab placement configuration

Alignment and Layout

📄 Read: references/alignment-layout.md

  • Tab alignment (Top, Bottom, Left, Right)
  • Text alignment within tabs
  • Multi-line tab support
  • RTL (Right-to-Left) support
  • Rotating tabs and text
  • TabGap spacing

Appearance and Customization

📄 Read: references/appearance-customization.md

  • Background colors and images
  • Active and inactive tab colors
  • Font and forecolor settings
  • Border styles and colors
  • Tab styles (2D, 3D, Metro, Office themes)
  • SizeMode options (Normal, Fixed, ShrinkToFit, FillToRight)

Interactive Features

📄 Read: references/interactive-features.md

  • Close button settings
  • Tooltip and SuperTooltip support
  • Scroll buttons and scrollbars
  • Middle-click to close tabs
  • Auto-scroll configuration

Tab Navigation

📄 Read: references/tab-navigation.md

  • TabPrimitives overview
  • Navigation control types (FirstTab, LastTab, NextTab, PreviousTab, etc.)
  • DropDown and Close primitives
  • Custom primitives
  • Creating TabPrimitives programmatically

Customization and Editing

📄 Read: references/customization-editing.md

  • Renaming tab headers at runtime (LabelEdit)
  • Drag-and-drop tab reordering (UserMoveTabs)
  • Padding and spacing
  • Tab page border styles
  • Animated GIF images in tabs
  • Preventing specific tabs from moving

Serialization

📄 Read: references/serialization.md

  • PersistTabState property
  • Automatic tab state persistence
  • Saving tab order and active page

Events and Event Handling

📄 Read: references/events.md

  • Edit events (BeforeEdit, AfterEdit)
  • Selection events (SelectedIndexChanging, SelectedIndexChanged)
  • Tab primitive click events
  • DrawItem for custom rendering
  • Tab page events (Closed, Closing)
  • Other events (Paint, BackgroundImageChanged, etc.)

Quick Start Example

Basic Implementation

using Syncfusion.Windows.Forms.Tools;

// Create TabControlAdv
TabControlAdv tabControlAdv1 = new TabControlAdv();
tabControlAdv1.Size = new Size(400, 300);

// Create and add tab pages
TabPageAdv tabPage1 = new TabPageAdv();
tabPage1.Text = "Home";
tabPage1.ImageIndex = 0; // Optional icon

TabPageAdv tabPage2 = new TabPageAdv();
tabPage2.Text = "Settings";

tabControlAdv1.TabPages.Add(tabPage1);
tabControlAdv1.TabPages.Add(tabPage2);

// Add to form
this.Controls.Add(tabControlAdv1);

With Styling and Features

// Apply Office 2016 theme
tabControlAdv1.TabStyle = typeof(TabRendererOffice2016Colorful);

// Enable features
tabControlAdv1.ShowTabCloseButton = true;
tabControlAdv1.UserMoveTabs = true;
tabControlAdv1.LabelEdit = true;
tabControlAdv1.ShowToolTips = true;

// Customize appearance
tabControlAdv1.ActiveTabColor = Color.FromArgb(255, 255, 255);
tabControlAdv1.InactiveTabColor = Color.FromArgb(240, 240, 240);
tabControlAdv1.ActiveTabFont = new Font("Segoe UI", 9F, FontStyle.Bold);

Common Patterns

Pattern 1: Tabbed Document Interface

// Create tab control for documents
TabControlAdv documentTabs = new TabControlAdv();
documentTabs.Dock = DockStyle.Fill;
documentTabs.ShowTabCloseButton = true;
documentTabs.ShowCloseButtonForActiveTabOnly = true;

// Add document tabs dynamically
void AddDocumentTab(string title, Control content)
{
    TabPageAdv docTab = new TabPageAdv();
    docTab.Text = title;
    docTab.Controls.Add(content);
    content.Dock = DockStyle.Fill;
    documentTabs.TabPages.Add(docTab);
    documentTabs.SelectedTab = docTab;
}

// Handle tab closing
documentTabs.SelectedTab.Closing += (sender, e) =>
{
    var result = MessageBox.Show("Save changes?", "Close",
        MessageBoxButtons.YesNoCancel);
    if (result == DialogResult.Cancel)
        e.Cancel = true;
};

Pattern 2: Navigation Tabs with Icons

// Setup image list
ImageList tabImages = new ImageList();
tabImages.Images.Add("home", Properties.Resources.HomeIcon);
tabImages.Images.Add("settings", Properties.Resources.SettingsIcon);
tabControlAdv1.ImageList = tabImages;

// Create tabs with icons
TabPageAdv homeTab = new TabPageAdv();
homeTab.Text = "Home";
homeTab.ImageIndex = 0;

TabPageAdv settingsTab = new TabPageAdv();
settingsTab.Text = "Settings";
settingsTab.ImageIndex = 1;

// Configure alignment
tabControlAdv1.ImageAlignmentR = RelativeImageAlignment.LeftOfText;

Pattern 3: Tab Navigation Controls

// Enable navigation primitives
tabControlAdv1.TabPrimitivesHost.Visible = true;

// Add navigation buttons
tabControlAdv1.TabPrimitivesHost.TabPrimitives.Add(
    new TabPrimitive(TabPrimitiveType.FirstTab, null, Color.Empty, true, 1, "First"));
tabControlAdv1.TabPrimitivesHost.TabPrimitives.Add(
    new TabPrimitive(TabPrimitiveType.PreviousTab, null, Color.Empty, true, 1, "Previous"));
tabControlAdv1.TabPrimitivesHost.TabPrimitives.Add(
    new TabPrimitive(TabPrimitiveType.NextTab, null, Color.Empty, true, 1, "Next"));
tabControlAdv1.TabPrimitivesHost.TabPrimitives.Add(
    new TabPrimitive(TabPrimitiveType.LastTab, null, Color.Empty, true, 1, "Last"));
tabControlAdv1.TabPrimitivesHost.TabPrimitives.Add(
    new TabPrimitive(TabPrimitiveType.DropDown, null, Color.Empty, true, 1, "DropDown"));

Pattern 4: Handling Tab Selection

// Prevent selection of specific tab
tabControlAdv1.SelectedIndexChanging += (sender, e) =>
{
    if (e.NewSelectedIndex == 2) // Prevent selecting 3rd tab
    {
        e.Cancel = true;
        MessageBox.Show("This tab is disabled");
    }
};

// React to selection changes
tabControlAdv1.SelectedIndexChanged += (sender, e) =>
{
    var selectedTab = tabControlAdv1.SelectedTab;
    Console.WriteLine($"Selected tab: {selectedTab.Text}");
    // Load content for selected tab
};

Key Properties

Core Properties

PropertyTypeDescription
TabPagesCollectionCollection of TabPageAdv items
SelectedIndexintIndex of currently selected tab
SelectedTabTabPageAdvCurrently selected tab page
AlignmentTabAlignmentTab position (Top, Bottom, Left, Right)
MultilineboolAllow tabs in multiple rows

Appearance Properties

PropertyTypeDescription
TabStyleTypeTheme renderer (2D, 3D, Metro, Office, VS styles)
ActiveTabColorColorBackground color of active tab
InactiveTabColorColorBackground color of inactive tabs
ActiveTabFontFontFont for active tab text
SizeModeTabSizeModeTab sizing mode

Feature Properties

PropertyTypeDescription
ShowTabCloseButtonboolShow close button on tabs
UserMoveTabsboolEnable drag-drop tab reordering
LabelEditboolEnable runtime tab text editing
ShowToolTipsboolEnable tooltips on tabs
ShowScrollboolShow scroll buttons when tabs overflow

Navigation Properties

PropertyTypeDescription
TabPrimitivesHostTabPrimitivesHostContainer for navigation buttons
SwitchPagesForDialogKeysboolEnable Ctrl+Tab navigation

Common Use Cases

Use Case 1: Application Settings Dialog

Create a tabbed settings dialog with categories like "General", "Appearance", "Advanced":

  • Use Alignment = TabAlignment.Left for vertical tabs
  • Apply consistent styling with TabStyle
  • Add icons to tabs with ImageList

Use Case 2: Multi-Document Editor

Build a document editor with closeable tabs:

  • Enable ShowTabCloseButton = true
  • Handle Closing event to prompt for unsaved changes
  • Use UserMoveTabs = true for reordering

Use Case 3: Wizard Interface

Create a step-by-step wizard with disabled tab selection:

  • Use SelectedIndexChanging to control navigation
  • Apply custom colors to indicate progress
  • Show/hide tabs based on wizard flow

Use Case 4: Dashboard with Sections

Organize dashboard content into sections:

  • Use Multiline = true for many tabs
  • Apply SizeMode.FillToRight for uniform tab widths
  • Enable ShowScroll for overflow handling

Assembly References

Required assemblies:

  • Syncfusion.Shared.Base.dll
  • Syncfusion.Shared.Windows.dll
  • Syncfusion.Tools.Base.dll
  • Syncfusion.Tools.Windows.dll

For Grid controls in tabs, also add:

  • Syncfusion.Grid.Base.dll
  • Syncfusion.Grid.Windows.dll

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.55%
按下载量换算80

Claude

29.08%
按下载量换算67

Cursor

21.06%
按下载量换算49

Gemini CLI

9.71%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills