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

syncfusion-winforms-gradient-panelSynfusion winforms 渐变面板

Agent Skill

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

总安装

698

周安装

30

GitHub Stars

1

下载量

245
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

实现具有渐变背景的区域面板容器,提升界面层次感和美观度。

  • 常用于仪表盘、信息卡片或强调性内容区块的视觉设计场景。
  • 支持通过技能系统自动引入 Syncfusion 控件库并生成对应布局代码。
  • 安装时需确保 NuGet 包版本与项目框架匹配,避免因版本差异导致编译失败。
  • 建议在原型阶段先行预览效果,再决定是否投入生产环境使用。

SKILL.md

Implementing Gradient Panels

This skill guides you through implementing the Syncfusion GradientPanel control in Windows Forms applications. GradientPanel is a panel-derived container control that provides advanced background customization with gradients, patterns, and solid colors.

When to Use This Skill

Use this skill when you need to:

  • Container with gradient backgrounds - Create visually appealing panels with gradient color transitions
  • Grouped controls with styling - Group related controls in a styled container panel
  • Pattern backgrounds - Use checkerboard, dots, stripes, or other pattern backgrounds
  • Visual separation - Create distinct visual sections with custom backgrounds
  • Styled containers - Replace standard panels with visually rich alternatives
  • Custom borders - Apply 2D or 3D borders with various styles
  • Scrollable containers - Create auto-scrolling panels for large content areas
  • Background images - Combine gradient effects with background images

Component Overview

GradientPanel is a panel-derived control that acts as a container for other controls. It extends the standard Panel with advanced background rendering capabilities.

Key capabilities:

  • Multiple background styles: Solid colors, gradient transitions, pattern fills
  • Gradient directions: Forward/backward diagonal, horizontal, vertical, path-based
  • Border customization: 2D and 3D borders with multiple styles
  • Image backgrounds: Support for background images with layout options
  • Auto-scrolling: Automatic scroll bars for content overflow
  • Auto-sizing: Automatic panel resizing based on content

Control type: Container control (inherits from Panel)

Assembly: Syncfusion.Shared.Base.dll

Namespace: Syncfusion.Windows.Forms.Tools

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly deployment and NuGet installation
  • Adding GradientPanel via Designer (toolbox)
  • Adding GradientPanel via code
  • Basic setup and initial configuration
  • First gradient panel examples

When to read: Starting a new implementation, need installation guidance, first-time setup

Background Styles and Customization

📄 Read: references/background-styles.md

  • Solid color backgrounds
  • Pattern backgrounds (53 pattern styles)
  • Gradient backgrounds (7 gradient directions)
  • BrushInfo configuration
  • Color blending and combinations
  • BackColor vs BackgroundColor properties

When to read: Need gradient effects, pattern fills, color transitions, custom background styling

Appearance Customization

📄 Read: references/appearance-customization.md

  • Foreground and background colors
  • Font and text styling
  • Background images and layout modes
  • Combining gradients with images
  • Transparency and layering effects

When to read: Need text styling, background images, layered effects, font customization

Border Settings

📄 Read: references/border-settings.md

  • 2D borders (FixedSingle) vs 3D borders (Fixed3D)
  • Border3DStyle options (Raised, Etched, Sunken, etc.)
  • BorderColor for 2D borders
  • BorderSides for selective borders
  • Visual border comparison

When to read: Need custom borders, 3D effects, border colors, selective border sides

Scroll and Auto-Size Settings

📄 Read: references/scroll-sizing.md

  • AutoScroll for content overflow
  • AutoScrollMargin and AutoScrollMinSize
  • AutoSize behavior
  • AutoSizeMode (GrowOnly vs GrowAndShrink)
  • Container management with child controls

When to read: Content exceeds panel size, need auto-scrolling, dynamic panel sizing

Quick Start

Basic Gradient Panel via Code

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

namespace GradientPanelDemo
{
    public partial class Form1 : Form
    {
        private GradientPanel gradientPanel1;

        public Form1()
        {
            InitializeComponent();
            CreateGradientPanel();
        }

        private void CreateGradientPanel()
        {
            // Create GradientPanel
            gradientPanel1 = new GradientPanel();
            gradientPanel1.Size = new Size(400, 300);
            gradientPanel1.Location = new Point(20, 20);

            // Set gradient background (blue to red, forward diagonal)
            gradientPanel1.BackgroundColor = new BrushInfo(
                GradientStyle.ForwardDiagonal,
                Color.Blue,
                Color.Red
            );

            // Add border
            gradientPanel1.BorderStyle = BorderStyle.FixedSingle;
            gradientPanel1.BorderColor = Color.White;

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

            // Add child controls to the panel
            Label label = new Label();
            label.Text = "Gradient Panel Content";
            label.ForeColor = Color.White;
            label.BackColor = Color.Transparent;
            label.Location = new Point(20, 20);
            label.AutoSize = true;
            gradientPanel1.Controls.Add(label);
        }
    }
}

Solid Background Panel

// Create panel with solid color background
GradientPanel solidPanel = new GradientPanel();
solidPanel.BackgroundColor = new BrushInfo(Color.MediumBlue);
solidPanel.BorderStyle = BorderStyle.FixedSingle;
solidPanel.BorderColor = Color.Red;

Pattern Background Panel

// Create panel with pattern background
GradientPanel patternPanel = new GradientPanel();
patternPanel.BackgroundColor = new BrushInfo(
    PatternStyle.LargeCheckerBoard,
    Color.Turquoise,  // Foreground color
    Color.MediumBlue  // Background color
);
patternPanel.BorderStyle = BorderStyle.FixedSingle;

Common Patterns

Pattern 1: Form Section with Gradient Header

// Create header panel with gradient
GradientPanel headerPanel = new GradientPanel();
headerPanel.Dock = DockStyle.Top;
headerPanel.Height = 80;
headerPanel.BackgroundColor = new BrushInfo(
    GradientStyle.Horizontal,
    Color.FromArgb(0, 120, 215),
    Color.FromArgb(0, 80, 150)
);

// Add title label
Label titleLabel = new Label();
titleLabel.Text = "Application Header";
titleLabel.Font = new Font("Segoe UI", 18, FontStyle.Bold);
titleLabel.ForeColor = Color.White;
titleLabel.BackColor = Color.Transparent;
titleLabel.AutoSize = true;
titleLabel.Location = new Point(20, 25);
headerPanel.Controls.Add(titleLabel);

this.Controls.Add(headerPanel);

Pattern 2: Content Container with Scroll

// Create scrollable content container
GradientPanel contentPanel = new GradientPanel();
contentPanel.Dock = DockStyle.Fill;
contentPanel.BackgroundColor = new BrushInfo(
    GradientStyle.Vertical,
    Color.WhiteSmoke,
    Color.LightGray
);
contentPanel.AutoScroll = true;
contentPanel.AutoScrollMargin = new Size(5, 5);

// Add multiple child controls that exceed panel size
for (int i = 0; i < 20; i++)
{
    Button btn = new Button();
    btn.Text = $"Button {i + 1}";
    btn.Location = new Point(10, 10 + (i * 40));
    btn.Size = new Size(200, 30);
    contentPanel.Controls.Add(btn);
}

this.Controls.Add(contentPanel);

Pattern 3: Sidebar Panel with Pattern

// Create sidebar with pattern background
GradientPanel sidebarPanel = new GradientPanel();
sidebarPanel.Dock = DockStyle.Left;
sidebarPanel.Width = 200;
sidebarPanel.BackgroundColor = new BrushInfo(
    PatternStyle.DarkDownwardDiagonal,
    Color.Gray,
    Color.DarkGray
);
sidebarPanel.BorderStyle = BorderStyle.Fixed3D;
sidebarPanel.Border3DStyle = Border3DStyle.Etched;

this.Controls.Add(sidebarPanel);

Pattern 4: Card-Style Panel Group

private void CreateCardPanels()
{
    FlowLayoutPanel container = new FlowLayoutPanel();
    container.Dock = DockStyle.Fill;
    container.Padding = new Padding(10);

    // Create multiple card-style panels
    for (int i = 0; i < 6; i++)
    {
        GradientPanel card = new GradientPanel();
        card.Size = new Size(180, 150);
        card.Margin = new Padding(5);
        card.BackgroundColor = new BrushInfo(
            GradientStyle.PathRectangle,
            Color.AliceBlue,
            Color.SteelBlue
        );
        card.BorderStyle = BorderStyle.FixedSingle;
        card.BorderColor = Color.SteelBlue;

        // Add card content
        Label cardTitle = new Label();
        cardTitle.Text = $"Card {i + 1}";
        cardTitle.Font = new Font("Segoe UI", 12, FontStyle.Bold);
        cardTitle.BackColor = Color.Transparent;
        cardTitle.AutoSize = true;
        cardTitle.Location = new Point(10, 10);
        card.Controls.Add(cardTitle);

        container.Controls.Add(card);
    }

    this.Controls.Add(container);
}

Key Properties

Background Properties

PropertyTypeDescription
BackgroundColorBrushInfoSets gradient, pattern, or solid background using BrushInfo
BackColorColorStandard background color (use BackgroundColor for gradients)
BackgroundImageImageBackground image for the panel
BackgroundImageLayoutImageLayoutLayout mode: Stretch, Tile, Center, Zoom

Border Properties

PropertyTypeDescription
BorderStyleBorderStyleFixedSingle (2D) or Fixed3D (3D borders)
Border3DStyleBorder3DStyle3D style: Raised, Etched, Sunken, Bump, etc.
BorderSingleButtonBorderStyle2D style: Solid, Dotted, Dashed, Inset, Outset
BorderColorColorColor for 2D borders (requires FixedSingle)
BorderSidesBorder3DSideSpecifies which sides have borders: All, Top, Bottom, Left, Right

Scroll and Sizing Properties

PropertyTypeDescription
AutoScrollboolEnable automatic scroll bars when content exceeds panel
AutoScrollMarginSizeMargin width during auto scroll
AutoScrollMinSizeSizeMinimum logical size for auto scroll region
AutoSizeboolAutomatically size panel based on content
AutoSizeModeAutoSizeModeGrowOnly or GrowAndShrink resizing behavior

Text and Font Properties

PropertyTypeDescription
FontFontFont style for text in the panel
ForeColorColorColor for text and graphics

Common Use Cases

Use Case 1: Application Dashboard

Use GradientPanel as a dashboard background with gradient styling to create visual hierarchy and modern appearance.

Use Case 2: Form Sections

Divide forms into logical sections using GradientPanels with different background styles for visual organization.

Use Case 3: Sidebar Navigation

Create sidebars with gradient or pattern backgrounds to distinguish navigation areas from content areas.

Use Case 4: Header/Footer Sections

Use gradient panels for headers and footers with horizontal gradients for professional appearance.

Use Case 5: Content Grouping

Group related controls (buttons, labels, inputs) in gradient panels for better visual organization.

Use Case 6: Card-Based Layouts

Create card-style UI with individual GradientPanels for each card, using PathRectangle gradients.

Use Case 7: Themed Containers

Apply consistent theming across application using gradient panels with unified color schemes.

Use Case 8: Scrollable Content Areas

Large content areas that need automatic scrolling with styled backgrounds.

Best Practices

  1. Use BackgroundColor for gradients - Use BackgroundColor with BrushInfo for gradients/patterns, not BackColor
  2. Match border to style - Use FixedSingle for 2D borders, Fixed3D for 3D borders
  3. Transparent child controls - Set child control BackColor = Color.Transparent to show gradient
  4. High contrast text - Use contrasting ForeColor for text visibility over gradients
  5. Consistent gradients - Use similar gradient directions across related panels
  6. Enable AutoScroll - For panels with many child controls that may exceed size
  7. BorderColor with FixedSingle - BorderColor only works with BorderStyle.FixedSingle
  8. PathRectangle for cards - Use GradientStyle.PathRectangle or PathEllipse for card-like effects
  9. Performance - Minimize gradient panels in high-frequency update scenarios
  10. Designer preview - Use Designer to preview gradients and adjust colors interactively

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.82%
按下载量换算85

Claude

31.44%
按下载量换算77

Cursor

17.27%
按下载量换算42

Gemini CLI

8.94%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills