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

syncfusion-winforms-popup同步融合 winforms 弹出窗口

Agent Skill

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

总安装

699

周安装

28

GitHub Stars

公开资料未说明

下载量

226
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

Syncfusion WinForms 弹出窗口控件,用于快速创建模态或非模态对话框界面。

  • 适用于消息提示、表单输入、工具面板等轻量级交互需求。
  • 可通过代码或设计器配置位置、大小、动画效果及内容布局。
  • 需确认当前项目是否已正确引用 Syncfusion UI 组件,避免运行时缺失依赖报错。
  • 注意弹出层层级管理,防止遮挡主窗口关键操作区域或引发 Z-order 冲突。

SKILL.md

Implementing Popup Controls (PopupControlContainer)

When to Use This Skill

Use this skill when the user:

  • Needs to create custom popup panels in Windows Forms applications
  • Wants to attach popups to parent controls (buttons, textboxes, labels, etc.)
  • Is implementing dropdown-like behavior with custom controls
  • Needs to configure auto-close, auto-scroll, or keyboard navigation for popups
  • Wants to handle popup lifecycle events (before showing, after showing, on close)
  • Is building context menus, dropdown panels, or custom picker controls
  • Needs to populate popups with child controls (buttons, grids, calendars, etc.)
  • Requires transparent or resizable popup windows
  • Is hosting ComboBoxBase or other complex controls within popups
  • Encounters issues with popup closing behavior or focus management

Component Overview

PopupControlContainer is a panel-derived control that allows you to populate it with child controls and associate it with a parent control. By default, the popup is hidden and can be shown programmatically through events like mouse clicks, button presses, or keyboard actions on the parent control.

Key Capabilities:

  • Host any child controls (buttons, textboxes, grids, custom controls)
  • Associate with any parent control
  • Auto-close when clicking outside the popup
  • Auto-scroll when content exceeds popup size
  • Keyboard navigation with dialog keys (Enter, Esc, Tab, F4, F2)
  • Event-driven lifecycle (BeforePopup, Popup, CloseUp)
  • Programmatic show/hide with position control
  • Resizable and transparent popup windows
  • Support for nested popups (ComboBoxBase hosting)

Common Use Cases:

  • Custom dropdown panels for textboxes or buttons
  • Color pickers, date pickers, or custom selectors
  • Context-sensitive toolbars or option panels
  • Tooltip-like windows with interactive controls
  • Custom combo box implementations

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly deployment and NuGet packages
  • Adding control via designer and code
  • Basic parent control association
  • ShowPopup and HidePopup methods
  • Complete working examples

Popup Behavior Configuration

Auto-Close Behavior 📄 Read: references/auto-close-behavior.md

  • Default auto-close on outside click
  • IgnoreMouseMessages property
  • PopupCloseType modes (Done, Canceled, Deactivated)
  • Conditional closing scenarios

Auto-Scroll 📄 Read: references/autoscroll.md

  • Enabling automatic scrollbars
  • AutoScrollMargin and AutoScrollMinSize
  • Handling content overflow

Keyboard Navigation 📄 Read: references/keyboard-navigation.md

  • Default dialog key behavior
  • IgnoreDialogKey property
  • Custom keyboard handling

Events and Lifecycle

📄 Read: references/events.md

  • BeforePopup event (before showing, resizing)
  • Popup event (after shown, focus management)
  • CloseUp event (on close, data transfer)
  • Mnemonic support and focus handling
  • Complete event handler examples

Advanced Scenarios

📄 Read: references/advanced-scenarios.md

  • Hosting ComboBoxBase controls
  • Creating transparent popups
  • Checking popup state with IsShowing()
  • BeforeCloseUp workarounds
  • Edge cases and troubleshooting

Quick Start Example

Basic Popup Setup

using Syncfusion.Windows.Forms;

public partial class Form1 : Form
{
    private PopupControlContainer popupControlContainer1;
    private Button button1;
    private RichTextBox richTextBox1;

    public Form1()
    {
        InitializeComponent();

        // Initialize popup container
        this.popupControlContainer1 = new PopupControlContainer();

        // Add child control (button in this example)
        this.button1 = new Button();
        this.button1.Text = "Click Me";
        this.button1.Location = new Point(10, 10);
        this.popupControlContainer1.Controls.Add(this.button1);

        // Configure popup
        this.popupControlContainer1.Size = new Size(200, 100);

        // Create parent control
        this.richTextBox1 = new RichTextBox();
        this.richTextBox1.Size = new Size(150, 50);
        this.richTextBox1.Location = new Point(20, 20);
        this.richTextBox1.Click += RichTextBox1_Click;

        // Associate popup with parent
        this.popupControlContainer1.ParentControl = this.richTextBox1;

        // Add controls to form
        this.Controls.Add(this.richTextBox1);
    }

    private void RichTextBox1_Click(object sender, EventArgs e)
    {
        // Show popup at default position
        this.popupControlContainer1.ShowPopup(Point.Empty);
    }
}

Show Popup at Specific Position

// Show at specific screen coordinates
this.popupControlContainer1.ShowPopup(new Point(100, 200));

// Show below parent control
Point location = this.richTextBox1.PointToScreen(
    new Point(0, this.richTextBox1.Height));
this.popupControlContainer1.ShowPopup(location);

Hide Popup Programmatically

// Simple hide
this.popupControlContainer1.HidePopup();

// Hide with close type
this.popupControlContainer1.HidePopup(PopupCloseType.Done);
this.popupControlContainer1.HidePopup(PopupCloseType.Canceled);

Common Patterns

Pattern 1: Conditional Auto-Close

// Prevent auto-close on outside clicks
this.popupControlContainer1.IgnoreMouseMessages = true;

// Close only when condition is met
private void ValidateButton_Click(object sender, EventArgs e)
{
    if (ValidateInput())
    {
        this.popupControlContainer1.HidePopup(PopupCloseType.Done);
    }
}

Pattern 2: Data Transfer on Close

private void PopupControlContainer1_CloseUp(object sender, PopupClosedEventArgs e)
{
    if (e.PopupCloseType == PopupCloseType.Done)
    {
        // Transfer data from popup to parent form
        this.textBox1.Text = this.popupTextBox.Text;
    }
    else if (e.PopupCloseType == PopupCloseType.Canceled)
    {
        // Discard changes
    }
}

Pattern 3: Resizable Popup

private void PopupControlContainer1_BeforePopup(object sender, CancelEventArgs e)
{
    // Make popup resizable
    this.popupControlContainer1.PopupHost.FormBorderStyle = FormBorderStyle.SizableToolWindow;
    this.popupControlContainer1.Dock = DockStyle.Fill;

    // Set minimum size
    if (this.popupControlContainer1.PopupHost.Size.Width < 200)
    {
        this.popupControlContainer1.PopupHost.Size = new Size(200, 150);
    }
}

Pattern 4: Transparent Popup

private void PopupControlContainer1_BeforePopup(object sender, CancelEventArgs e)
{
    // Set opacity for transparency
    this.popupControlContainer1.PopupHost.Opacity = 0.75;
}

Key Properties and Methods

Properties

PropertyTypeDescription
ParentControlControlThe control to which the popup is associated
IgnoreMouseMessagesboolPrevents auto-close on outside clicks when true
IgnoreDialogKeyboolDisables default keyboard closing behavior when true
AutoScrollboolEnables automatic scrollbars when content overflows
AutoScrollMarginSizeMargin around scroll region
AutoScrollMinSizeSizeMinimum size for scroll region
PopupHostFormThe host form containing the popup (access in events)

Methods

MethodDescription
ShowPopup(Point)Displays the popup at the specified screen coordinates
HidePopup()Hides the popup
HidePopup(PopupCloseType)Hides the popup with a specific close type
IsShowing()Returns true if the popup is currently visible

Events

EventWhen RaisedKey Use Cases
BeforePopupBefore popup is shownResize popup, customize appearance, cancel showing
PopupAfter popup is shownSet focus, enable mnemonics
CloseUpWhen popup is closedTransfer data, restore focus, handle close types

Common Use Cases

Use Case 1: Custom Date Picker

Create a popup containing a calendar control attached to a textbox.

Use Case 2: Color Selector Popup

Build a color picker panel that pops up when clicking a button, with OK/Cancel buttons.

Use Case 3: Context-Sensitive Toolbar

Show a popup toolbar with formatting options when text is selected in a RichTextBox.

Use Case 4: Multi-Select Dropdown

Create a popup with checkboxes for multi-selection, closing only when "Done" is clicked.

Use Case 5: Cascading Popups

Host a ComboBoxBase within a popup, maintaining proper focus and preventing premature closure.

Troubleshooting Tips

Popup closes immediately:

  • Set IgnoreMouseMessages = true to prevent auto-close
  • Check if IgnoreDialogKey needs to be enabled
  • Verify event handlers aren't calling HidePopup() unintentionally

Child controls don't respond to mnemonics:

  • Handle the Popup event and call this.popupControlContainer1.Focus()

Popup appears at wrong position:

  • Use PointToScreen() to convert parent control coordinates to screen coordinates
  • Consider parent control size and screen boundaries

Content is cut off:

  • Enable AutoScroll = true
  • Set appropriate AutoScrollMinSize
  • Adjust popup size in BeforePopup event

ComboBoxBase dropdown closes popup:

  • Implement custom PopupControlContainer with overridden OnPopup()
  • Set parent-child relationship in ComboBoxBase's DropDown event
  • See references/advanced-scenarios.md for complete implementation

For detailed implementation guidance, code examples, and edge case handling, navigate to the appropriate reference file using the Documentation and Navigation Guide above.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.18%
按下载量换算77

Claude

29.45%
按下载量换算67

Cursor

18.75%
按下载量换算42

Gemini CLI

10.7%
按下载量换算24

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills