syncfusion-winforms-gradientpanelext

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Implementing GradientPanelExt

实现 GradientPanelExt

An enhanced panel control for Windows Forms that provides gradient backgrounds, rounded corners, border primitives, and collapse/expand functionality for creating sophisticated container panels.
这是一款适用于 Windows Forms 的增强型面板控件,提供渐变背景、圆角、边框基元以及折叠/展开功能,可用于创建精致的容器面板。

When to Use This Skill

何时使用本技能

Use this skill when you need to:
  • Gradient Container Panels: Create panels with gradient backgrounds that contain other controls
  • Rounded Corner Panels: Design panels with customizable corner radius for modern UI
  • Border Primitives: Add text, images, buttons, or controls to panel borders (unique feature)
  • Collapsible Sections: Implement expandable/collapsible panel sections with animation
  • Styled Containers: Build visually appealing container panels with custom backgrounds
  • Login/Dialog Panels: Create attractive login forms or dialog boxes with gradients
  • Dashboard Sections: Design dashboard panels with titles and controls in borders
当你需要实现以下需求时可使用本技能:
  • 渐变容器面板:创建带有渐变背景、可承载其他控件的面板
  • 圆角面板:设计支持自定义圆角半径的面板,适配现代UI风格
  • 边框基元:在面板边框上添加文本、图片、按钮或其他控件(独有特性)
  • 可折叠区块:实现带动画效果的可展开/折叠面板区块
  • 样式化容器:构建带有自定义背景、视觉效果出众的容器面板
  • 登录/对话框面板:创建带有渐变效果的精美登录表单或对话框
  • 仪表盘区块:设计边框上带有标题和控件的仪表盘面板

Component Overview

组件概述

The GradientPanelExt is an enhanced version of the standard Panel control that provides:
  • Multiple gradient styles (Horizontal, Vertical, Diagonal, PathRectangle, PathEllipse)
  • Rounded corners with configurable radius
  • Primitives system - host text, images, collapse controls, and .NET controls in panel borders
  • Pattern and solid background options
  • Collapse/expand animation support
  • Multi-color gradient support
  • Acts as container for other WinForms controls
Key Capabilities:
  • Gradient background using BrushInfo class
  • CornerRadius for rounded rectangle appearance
  • Primitives collection (CollapsePrimitive, ImagePrimitive, TextPrimitive, HostPrimitive)
  • BorderGap for spacing control
  • Animated collapse/expand with speed and delay settings
  • Background image support
  • Hosts child controls like standard Panel
Unique Feature - Primitives: GradientPanelExt's most powerful feature is the ability to add "primitives" to panel borders - text labels, images, collapse buttons, or even entire .NET controls positioned in the Top, Bottom, Left, or Right borders.
GradientPanelExt 是标准 Panel 控件的增强版本,提供以下能力:
  • 多种渐变样式(水平、垂直、对角线、路径矩形、路径椭圆)
  • 支持配置半径的圆角效果
  • 基元系统:可在面板边框中承载文本、图片、折叠控件以及各类.NET控件
  • 图案和纯色背景选项
  • 折叠/展开动画支持
  • 多色渐变支持
  • 可作为其他 WinForms 控件的容器
核心能力:
  • 基于 BrushInfo 类实现渐变背景
  • 用 CornerRadius 实现圆角外观
  • 基元集合(CollapsePrimitive、ImagePrimitive、TextPrimitive、HostPrimitive)
  • 用 BorderGap 控制间距
  • 支持配置速度和延迟的折叠/展开动画
  • 背景图片支持
  • 和标准 Panel 一样可承载子控件
独有特性 - 基元: GradientPanelExt 最强大的特性是支持在面板边框中添加「基元」,可将文本标签、图片、折叠按钮甚至完整的.NET控件定位到顶部、底部、左侧或右侧边框中。

Documentation and Navigation Guide

文档和导航指南

Getting Started

入门指南

📄 Read: references/getting-started.md
When to read: Starting new implementation, setting up dependencies, first-time usage
Topics covered:
  • Assembly deployment (Syncfusion.Shared.Base)
  • NuGet package installation
  • Adding via Visual Studio designer (toolbox drag-drop)
  • Adding via code (manual instantiation)
  • Basic panel initialization and configuration
  • Adding child controls to the panel
  • PrimitiveCollection Editor introduction
  • Simple gradient panel examples
  • Namespace requirements (Syncfusion.Windows.Forms.Tools)

📄 阅读: references/getting-started.md
适用场景: 首次实现新功能、配置依赖、第一次使用该控件
覆盖主题:
  • 程序集部署(Syncfusion.Shared.Base)
  • NuGet 包安装
  • 通过 Visual Studio 设计器添加(工具箱拖拽)
  • 通过代码添加(手动实例化)
  • 基础面板初始化和配置
  • 向面板添加子控件
  • PrimitiveCollection 编辑器介绍
  • 简单渐变面板示例
  • 命名空间要求(Syncfusion.Windows.Forms.Tools)

Background Styling

背景样式设置

📄 Read: references/background-styling.md
When to read: Configuring gradients, setting background colors, customizing panel appearance
Topics covered:
  • BackgroundColor property and BrushInfo class
  • Background styles (Solid, Pattern, Gradient, None)
  • Gradient styles (Horizontal, Vertical, ForwardDiagonal, BackwardDiagonal, PathRectangle, PathEllipse)
  • BackColor and ForeColor properties
  • Multi-color gradients using GradientColors array
  • Pattern backgrounds with PatternStyle
  • BackgroundImage and BackgroundImageLayout
  • Creating complex color transitions
  • Complete styling examples with code

📄 阅读: references/background-styling.md
适用场景: 配置渐变效果、设置背景色、自定义面板外观
覆盖主题:
  • BackgroundColor 属性和 BrushInfo 类
  • 背景样式(纯色、图案、渐变、无)
  • 渐变样式(水平、垂直、向前对角线、向后对角线、路径矩形、路径椭圆)
  • BackColor 和 ForeColor 属性
  • 使用 GradientColors 数组实现多色渐变
  • 带 PatternStyle 的图案背景
  • BackgroundImage 和 BackgroundImageLayout
  • 创建复杂的色彩过渡效果
  • 完整的样式代码示例

Border and Corner Settings

边框和圆角设置

📄 Read: references/border-corner-settings.md
When to read: Customizing corners, adjusting border appearance, creating rounded panels
Topics covered:
  • CornerRadius property for rounded corners
  • Removing rounded corners (CornerRadius = 0)
  • BorderGap property for margin spacing
  • Sharp vs rounded corner design
  • Coordinating corners with gradients
  • Complete examples with different radius values
  • Best practices for modern vs classic design

📄 阅读: references/border-corner-settings.md
适用场景: 自定义圆角、调整边框外观、创建圆角面板
覆盖主题:
  • 用于设置圆角的 CornerRadius 属性
  • 移除圆角效果(CornerRadius = 0)
  • 用于设置外边距的 BorderGap 属性
  • 直角与圆角设计对比
  • 圆角与渐变效果的协调
  • 不同半径值的完整示例
  • 现代与经典设计的最佳实践

Primitives

基元

📄 Read: references/primitives.md
When to read: Adding border elements, implementing collapse functionality, hosting controls in borders
Topics covered:
  • Primitives overview and PrimitiveCollection Editor
  • CollapsePrimitive (expand/collapse with images)
  • ImagePrimitive (images in borders)
  • TextPrimitive (text labels in borders)
  • HostPrimitive (hosting .NET controls in borders)
  • Alignment property (Top, Bottom, Left, Right)
  • Position property for pixel placement
  • Size property for primitive dimensions
  • Complete examples with all primitive types
  • Login panel with primitives example

📄 阅读: references/primitives.md
适用场景: 添加边框元素、实现折叠功能、在边框中承载控件
覆盖主题:
  • 基元概述和 PrimitiveCollection 编辑器
  • CollapsePrimitive(带图片的展开/折叠功能)
  • ImagePrimitive(边框中的图片)
  • TextPrimitive(边框中的文本标签)
  • HostPrimitive(在边框中承载.NET控件)
  • Alignment 属性(顶部、底部、左侧、右侧)
  • 用于像素定位的 Position 属性
  • 用于设置基元尺寸的 Size 属性
  • 所有基元类型的完整示例
  • 带基元的登录面板示例

Collapse and Expand Animation

折叠和展开动画

📄 Read: references/collapse-expand-animation.md
When to read: Implementing animated collapse, configuring animation behavior
Topics covered:
  • Animated property (enable/disable animation)
  • AnimationDelay property for timing
  • AnimationSpeed property for speed control
  • Integration with CollapsePrimitive
  • Smooth vs instant collapse behavior
  • Complete animation examples
  • Performance considerations

📄 阅读: references/collapse-expand-animation.md
适用场景: 实现带动画的折叠效果、配置动画行为
覆盖主题:
  • Animated 属性(启用/禁用动画)
  • 用于控制时序的 AnimationDelay 属性
  • 用于控制速度的 AnimationSpeed 属性
  • 与 CollapsePrimitive 的集成
  • 平滑与即时折叠行为对比
  • 完整的动画示例
  • 性能注意事项

Scroll Settings and Events

滚动设置和事件

📄 Read: references/scroll-settings-events.md
When to read: Handling scrollable content, responding to events, custom event handling
Topics covered:
  • AutoScroll property for scrollable panels
  • Scroll bar configuration
  • GradientPanelExt-specific events
  • Collapse/expand event handling
  • Primitive click events
  • Paint events for custom drawing
  • Complete event handler examples
  • Memory management and cleanup

📄 阅读: references/scroll-settings-events.md
适用场景: 处理可滚动内容、响应事件、自定义事件处理
覆盖主题:
  • 用于可滚动面板的 AutoScroll 属性
  • 滚动条配置
  • GradientPanelExt 专属事件
  • 折叠/展开事件处理
  • 基元点击事件
  • 用于自定义绘制的 Paint 事件
  • 完整的事件处理器示例
  • 内存管理和清理

Quick Start

快速开始

Basic Gradient Panel Setup

基础渐变面板设置

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

// Create GradientPanelExt
GradientPanelExt gradientPanel = new GradientPanelExt();
gradientPanel.Size = new Size(400, 200);
gradientPanel.Location = new Point(20, 20);

// Set gradient background (horizontal blue gradient)
gradientPanel.BackgroundColor = new BrushInfo(
    GradientStyle.Horizontal,
    Color.DarkBlue,
    Color.LightSkyBlue
);

// Rounded corners
gradientPanel.CornerRadius = 10;

// Add child controls
Label label = new Label
{
    Text = "Welcome",
    ForeColor = Color.White,
    BackColor = Color.Transparent,
    Location = new Point(20, 20),
    AutoSize = true
};
gradientPanel.Controls.Add(label);

// Add to form
this.Controls.Add(gradientPanel);
csharp
using Syncfusion.Windows.Forms.Tools;
using Syncfusion.Drawing;

// Create GradientPanelExt
GradientPanelExt gradientPanel = new GradientPanelExt();
gradientPanel.Size = new Size(400, 200);
gradientPanel.Location = new Point(20, 20);

// Set gradient background (horizontal blue gradient)
gradientPanel.BackgroundColor = new BrushInfo(
    GradientStyle.Horizontal,
    Color.DarkBlue,
    Color.LightSkyBlue
);

// Rounded corners
gradientPanel.CornerRadius = 10;

// Add child controls
Label label = new Label
{
    Text = "Welcome",
    ForeColor = Color.White,
    BackColor = Color.Transparent,
    Location = new Point(20, 20),
    AutoSize = true
};
gradientPanel.Controls.Add(label);

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

With Primitives in Borders

边框带基元的实现

csharp
// Add title text primitive at top border
TextPrimitive titlePrimitive = new TextPrimitive
{
    Text = "User Login",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    TextColor = Color.White,
    TextFont = new Font("Arial", 12, FontStyle.Bold),
    Size = new Size(100, 25),
    BackColor = Color.Transparent
};

// Add button primitives at bottom border
TextPrimitive okButton = new TextPrimitive
{
    Text = "OK",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Bottom,
    Position = 100,
    Size = new Size(60, 25),
    BackColor = Color.White,
    TextColor = Color.Black
};

TextPrimitive cancelButton = new TextPrimitive
{
    Text = "Cancel",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Bottom,
    Position = 180,
    Size = new Size(60, 25),
    BackColor = Color.White,
    TextColor = Color.Black
};

// Add primitives to panel
gradientPanel.Primitives.AddRange(new Primitive[] { 
    titlePrimitive, 
    okButton, 
    cancelButton 
});
csharp
// Add title text primitive at top border
TextPrimitive titlePrimitive = new TextPrimitive
{
    Text = "User Login",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    TextColor = Color.White,
    TextFont = new Font("Arial", 12, FontStyle.Bold),
    Size = new Size(100, 25),
    BackColor = Color.Transparent
};

// Add button primitives at bottom border
TextPrimitive okButton = new TextPrimitive
{
    Text = "OK",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Bottom,
    Position = 100,
    Size = new Size(60, 25),
    BackColor = Color.White,
    TextColor = Color.Black
};

TextPrimitive cancelButton = new TextPrimitive
{
    Text = "Cancel",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Bottom,
    Position = 180,
    Size = new Size(60, 25),
    BackColor = Color.White,
    TextColor = Color.Black
};

// Add primitives to panel
gradientPanel.Primitives.AddRange(new Primitive[] { 
    titlePrimitive, 
    okButton, 
    cancelButton 
});

Common Patterns

常用模式

Pattern 1: Login Panel with Gradient and Primitives

模式1:带渐变和基元的登录面板

csharp
// Create login panel
GradientPanelExt loginPanel = new GradientPanelExt
{
    Size = new Size(350, 180),
    Location = new Point(50, 50),
    CornerRadius = 12
};

// Dark gradient background
loginPanel.BackgroundColor = new BrushInfo(
    GradientStyle.Horizontal,
    Color.FromArgb(40, 40, 40),
    Color.FromArgb(80, 80, 80)
);

// Title primitive at top
TextPrimitive title = new TextPrimitive
{
    Text = "Login",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    TextColor = Color.White,
    TextFont = new Font("Segoe UI", 14, FontStyle.Bold),
    Size = new Size(80, 30),
    BackColor = Color.Transparent
};
loginPanel.Primitives.Add(title);

// Add username and password textboxes inside panel
Label lblUsername = new Label
{
    Text = "Username:",
    Location = new Point(30, 40),
    ForeColor = Color.White,
    BackColor = Color.Transparent,
    AutoSize = true
};

TextBox txtUsername = new TextBox
{
    Location = new Point(110, 38),
    Size = new Size(180, 20)
};

loginPanel.Controls.Add(lblUsername);
loginPanel.Controls.Add(txtUsername);
csharp
// Create login panel
GradientPanelExt loginPanel = new GradientPanelExt
{
    Size = new Size(350, 180),
    Location = new Point(50, 50),
    CornerRadius = 12
};

// Dark gradient background
loginPanel.BackgroundColor = new BrushInfo(
    GradientStyle.Horizontal,
    Color.FromArgb(40, 40, 40),
    Color.FromArgb(80, 80, 80)
);

// Title primitive at top
TextPrimitive title = new TextPrimitive
{
    Text = "Login",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    TextColor = Color.White,
    TextFont = new Font("Segoe UI", 14, FontStyle.Bold),
    Size = new Size(80, 30),
    BackColor = Color.Transparent
};
loginPanel.Primitives.Add(title);

// Add username and password textboxes inside panel
Label lblUsername = new Label
{
    Text = "Username:",
    Location = new Point(30, 40),
    ForeColor = Color.White,
    BackColor = Color.Transparent,
    AutoSize = true
};

TextBox txtUsername = new TextBox
{
    Location = new Point(110, 38),
    Size = new Size(180, 20)
};

loginPanel.Controls.Add(lblUsername);
loginPanel.Controls.Add(txtUsername);

Pattern 2: Collapsible Dashboard Section

模式2:可折叠的仪表盘区块

csharp
// Create collapsible panel
GradientPanelExt dashboardPanel = new GradientPanelExt
{
    Size = new Size(400, 250),
    Location = new Point(20, 20),
    CornerRadius = 8,
    Animated = true,
    AnimationSpeed = 3
};

// Vertical gradient
dashboardPanel.BackgroundColor = new BrushInfo(
    GradientStyle.Vertical,
    Color.WhiteSmoke,
    Color.LightGray
);

// Section title
TextPrimitive sectionTitle = new TextPrimitive
{
    Text = "Sales Statistics",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    TextColor = Color.DarkBlue,
    TextFont = new Font("Arial", 12, FontStyle.Bold),
    Size = new Size(150, 25)
};

// Collapse primitive
CollapsePrimitive collapseButton = new CollapsePrimitive
{
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    Position = 350,
    Size = new Size(30, 30),
    BackColor = Color.Transparent
};
// Set images in designer or load from resources

dashboardPanel.Primitives.AddRange(new Primitive[] { 
    sectionTitle, 
    collapseButton 
});
csharp
// Create collapsible panel
GradientPanelExt dashboardPanel = new GradientPanelExt
{
    Size = new Size(400, 250),
    Location = new Point(20, 20),
    CornerRadius = 8,
    Animated = true,
    AnimationSpeed = 3
};

// Vertical gradient
dashboardPanel.BackgroundColor = new BrushInfo(
    GradientStyle.Vertical,
    Color.WhiteSmoke,
    Color.LightGray
);

// Section title
TextPrimitive sectionTitle = new TextPrimitive
{
    Text = "Sales Statistics",
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    TextColor = Color.DarkBlue,
    TextFont = new Font("Arial", 12, FontStyle.Bold),
    Size = new Size(150, 25)
};

// Collapse primitive
CollapsePrimitive collapseButton = new CollapsePrimitive
{
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    Position = 350,
    Size = new Size(30, 30),
    BackColor = Color.Transparent
};
// Set images in designer or load from resources

dashboardPanel.Primitives.AddRange(new Primitive[] { 
    sectionTitle, 
    collapseButton 
});

Pattern 3: Panel with Image and Host Primitives

模式3:带图片和宿主基元的面板

csharp
// Create styled panel
GradientPanelExt styledPanel = new GradientPanelExt
{
    Size = new Size(450, 300),
    CornerRadius = 10
};

// PathEllipse gradient with multiple colors
styledPanel.BackgroundColor = new BrushInfo(
    GradientStyle.PathEllipse,
    new Color[]
    {
        Color.LightBlue,
        Color.LightCyan,
        Color.PaleTurquoise
    }
);

// Image primitive at top-left
ImagePrimitive logo = new ImagePrimitive
{
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    Position = 10,
    Size = new Size(40, 40)
    // Set Image property from resources
};

// Host a ProgressBar at bottom
ProgressBar progressBar = new ProgressBar
{
    Value = 50,
    Style = ProgressBarStyle.Continuous
};

HostPrimitive progressHost = new HostPrimitive
{
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Bottom,
    Position = 100,
    Size = new Size(250, 20),
    HostControl = progressBar,
    BackColor = Color.Transparent
};

styledPanel.Primitives.AddRange(new Primitive[] { 
    logo, 
    progressHost 
});
csharp
// Create styled panel
GradientPanelExt styledPanel = new GradientPanelExt
{
    Size = new Size(450, 300),
    CornerRadius = 10
};

// PathEllipse gradient with multiple colors
styledPanel.BackgroundColor = new BrushInfo(
    GradientStyle.PathEllipse,
    new Color[]
    {
        Color.LightBlue,
        Color.LightCyan,
        Color.PaleTurquoise
    }
);

// Image primitive at top-left
ImagePrimitive logo = new ImagePrimitive
{
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Top,
    Position = 10,
    Size = new Size(40, 40)
    // Set Image property from resources
};

// Host a ProgressBar at bottom
ProgressBar progressBar = new ProgressBar
{
    Value = 50,
    Style = ProgressBarStyle.Continuous
};

HostPrimitive progressHost = new HostPrimitive
{
    Alignment = Syncfusion.Windows.Forms.Tools.Alignment.Bottom,
    Position = 100,
    Size = new Size(250, 20),
    HostControl = progressBar,
    BackColor = Color.Transparent
};

styledPanel.Primitives.AddRange(new Primitive[] { 
    logo, 
    progressHost 
});

Key Properties

核心属性

Background Properties

背景属性

  • BackgroundColor: Gets/sets background using BrushInfo (style, colors, gradient)
  • BackgroundColor.Style: Brush style (Solid, Pattern, Gradient, None)
  • BackgroundColor.GradientStyle: Gradient direction (Horizontal, Vertical, ForwardDiagonal, BackwardDiagonal, PathRectangle, PathEllipse)
  • BackgroundColor.BackColor: Starting color for gradient
  • BackgroundColor.ForeColor: Ending color for gradient
  • BackgroundColor.PatternStyle: Pattern for Pattern brush style
  • BackgroundColor.GradientColors: Array for multi-color gradients
  • BackgroundImage: Background image for the panel
  • BackgroundImageLayout: Layout style for background image
  • BackgroundColor:通过 BrushInfo 获取/设置背景(样式、颜色、渐变)
  • BackgroundColor.Style:画笔样式(纯色、图案、渐变、无)
  • BackgroundColor.GradientStyle:渐变方向(水平、垂直、向前对角线、向后对角线、路径矩形、路径椭圆)
  • BackgroundColor.BackColor:渐变起始色
  • BackgroundColor.ForeColor:渐变结束色
  • BackgroundColor.PatternStyle:图案画笔样式的图案
  • BackgroundColor.GradientColors:多色渐变使用的颜色数组
  • BackgroundImage:面板的背景图片
  • BackgroundImageLayout:背景图片的布局样式

Border and Corner Properties

边框和圆角属性

  • CornerRadius: Radius for rounded corners (0 = sharp corners)
  • BorderGap: Spacing between border and margins
  • CornerRadius:圆角半径(0 = 直角)
  • BorderGap:边框与边距之间的间距

Primitive Properties

基元属性

  • Primitives: Collection of primitives (accessed via PrimitiveCollection Editor)
  • Primitive.Alignment: Border position (Top, Bottom, Left, Right)
  • Primitive.Position: Pixel offset along the border
  • Primitive.Size: Width and height of primitive
  • Primitive.BackColor: Background color for primitive
  • Primitives:基元集合(可通过 PrimitiveCollection 编辑器访问)
  • Primitive.Alignment:边框位置(顶部、底部、左侧、右侧)
  • Primitive.Position:沿边框的像素偏移量
  • Primitive.Size:基元的宽高
  • Primitive.BackColor:基元的背景色

Animation Properties

动画属性

  • Animated: Enable/disable collapse animation
  • AnimationDelay: Delay in milliseconds for animation
  • AnimationSpeed: Speed factor for animation
  • Animated:启用/禁用折叠动画
  • AnimationDelay:动画延迟(毫秒)
  • AnimationSpeed:动画速度系数

Container Properties (Inherited from Panel)

容器属性(继承自Panel)

  • Controls: Collection of child controls hosted in the panel
  • AutoScroll: Enable scrollbars for overflow content
  • Padding: Internal padding for child controls
  • Controls:面板承载的子控件集合
  • AutoScroll:为溢出内容启用滚动条
  • Padding:子控件的内边距

Common Use Cases

常见使用场景

Login/Authentication Panels

登录/认证面板

Create visually appealing login forms with gradient backgrounds, titles in borders, and button primitives.
创建视觉效果出众的登录表单,支持渐变背景、边框标题和按钮基元。

Dashboard Sections

仪表盘区块

Build dashboard panels with section titles in top border and collapsible functionality.
构建顶部边框带有区块标题、支持折叠功能的仪表盘面板。

Settings Panels

设置面板

Design settings containers with category titles and organized control groups.
设计带有分类标题和规整控件分组的设置容器。

Information Boxes

信息提示框

Create styled information panels with icons in borders and rich content inside.
创建边框带图标、内部内容丰富的样式化信息面板。

Wizard Steps

向导步骤

Implement wizard step panels with step numbers or icons in borders.
实现边框带有步骤编号或图标的向导步骤面板。

Grouped Controls

控件分组

Organize related form controls in visually distinct gradient panels.
将相关表单控件组织到视觉上区分的渐变面板中。

Collapsible Sidebars

可折叠侧边栏

Create expandable sidebar panels with collapse primitives for space management.
创建带有折叠基元的可展开侧边栏面板,用于空间管理。

Related Skills

相关技能

  • GradientLabel - Labels with gradient backgrounds
  • GradientPanel - Basic gradient panels (simpler version)
  • GradientLabel - 带渐变背景的标签
  • GradientPanel - 基础渐变面板(简化版本)

Notes

注意事项

  • GradientPanelExt derives from Panel, so all standard Panel functionality is available
  • The Primitives feature is unique to GradientPanelExt and extremely powerful
  • Primitives are positioned in borders, not in the main panel area
  • CornerRadius provides rounded corners by default (set to 0 for sharp corners)
  • Child controls are added to the Controls collection like a normal Panel
  • CollapsePrimitive requires collapse and expand images to be set
  • HostPrimitive can host any .NET control, even custom controls
  • Animation properties only affect collapse/expand when CollapsePrimitive is used
  • BackgroundColor and Primitives can use same or coordinated gradients
  • Performance is good for typical usage; avoid excessive primitives
  • GradientPanelExt 继承自 Panel,因此所有标准 Panel 功能都可用
  • 基元特性是 GradientPanelExt 独有的,功能非常强大
  • 基元定位在边框中,而非主面板区域
  • 默认通过 CornerRadius 实现圆角效果(设置为0即可使用直角)
  • 子控件和普通 Panel 一样添加到 Controls 集合中
  • CollapsePrimitive 需要设置折叠和展开图片
  • HostPrimitive 可以承载任何.NET控件,甚至自定义控件
  • 仅当使用 CollapsePrimitive 时,动画属性才会影响折叠/展开效果
  • BackgroundColor 和基元可以使用相同或协调的渐变
  • 常规使用下性能表现良好,避免使用过多基元