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

syncfusion-winforms-navigation-viewSynfusion Winforms 导航视图

Agent Skill

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

总安装

776

周安装

33

GitHub Stars

1

下载量

272
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

可视化导航面板控件,以图标+文字组合形式引导用户操作流程。

  • 常见于设置向导、多步骤任务或模块化功能聚合界面设计。
  • 技能提供状态指示(选中/悬停/禁用)与过渡动画,增强操作感知。
  • 动态加载子页面时应预判加载时长,必要时展示骨架屏降低等待焦虑。
  • 主题切换时需同步更新图标语义,避免文化差异导致误解。

SKILL.md

Implementing Navigation Views in Windows Forms

When to Use This Skill

Use the NavigationView control when you need:

  • Breadcrumb Navigation: Display hierarchical location paths (e.g., MyComputer > C: > Program Files > App)
  • File Browser Interfaces: Track and navigate folder hierarchies like Windows Explorer
  • Location Tracking: Keep users aware of their current position in multi-level structures
  • Quick Navigation: Allow users to jump back to parent locations or navigate via dropdown
  • Settings/Configuration Wizards: Show user's progress through nested categories
  • Document Management: Navigate document folders, categories, or organizational structures

Key Feature: Unlike traditional menus or tree views, NavigationView shows the current path with dropdown access to siblings at each level.

Component Overview

The NavigationView control provides a breadcrumb-style navigation interface that displays a hierarchical path using Bars (nodes). Each Bar in the path shows a forward arrow that, when clicked, reveals a dropdown list of child Bars directly below it.

Core Concepts:

  • Bar: A single node in the navigation hierarchy (e.g., "MyComputer", "C:", "Users")
  • Parent Bar: A Bar that contains child Bars (root level or intermediate)
  • Child Bar: A Bar nested within a parent Bar
  • Selected Bar: The currently active Bar displayed in the path
  • History: Tracks previously visited Bars for quick return navigation

Visual Structure:

[Icon] MyComputer > C: > Program Files > App   [History ▼]
       └─────┬─────┘
              └─ Click arrow to see child Bars dropdown

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

Read this reference when you need to:

  • Install assemblies or NuGet packages for NavigationView
  • Add the control to a form via designer or code
  • Understand required namespaces (Syncfusion.Windows.Forms.Tools)
  • Set up a basic NavigationView with minimal configuration
  • See a complete minimal working example

Key Topics:

  • Assembly deployment (6 required DLLs)
  • Adding control via designer drag-and-drop
  • Adding control manually using code
  • Creating the first NavigationView instance
  • Basic setup and initialization

Bar Hierarchy and Structure

📄 Read: references/bar-hierarchy.md

Read this reference when you need to:

  • Create parent and child Bar relationships
  • Build multi-level navigation hierarchies
  • Add Bars to the NavigationView.Bars collection
  • Add child Bars to a parent Bar's Bars collection
  • Set the selected Bar to display a specific path
  • Understand Bar properties (Text, ImageIndex)

Key Topics:

  • Creating Bar instances
  • Parent-child Bar relationships
  • Adding root Bars to NavigationView
  • Adding child Bars to parent Bars
  • Setting SelectedBar property
  • Navigating between Bars programmatically

Dropdown Selection and History

📄 Read: references/dropdown-and-history.md

Read this reference when you need to:

  • Implement dropdown selection for child Bar navigation
  • Enable/disable history button tracking
  • Show previously visited locations in history dropdown
  • Add custom buttons to the NavigationView
  • Configure custom button appearance and images
  • Handle BarPopup event for dropdown customization
  • Control maximum items displayed in popups

Key Topics:

  • Forward arrow dropdown mechanism
  • ShowHistoryButtons property
  • History tracking and dropdown
  • Custom button collection
  • Adding custom buttons (designer and code)
  • BarPopup event handling
  • Customizable popup item count

Images and Visual Styling

📄 Read: references/images-and-styling.md

Read this reference when you need to:

  • Add icons to Bars using ImageList
  • Set ImageIndex for parent and child Bars
  • Apply visual styles (Office2007, Vista, Metro)
  • Configure VisualStyle property
  • Customize control appearance
  • Match application theme or style

Key Topics:

  • ImageList setup and assignment
  • Setting Bar ImageIndex properties
  • Visual styles overview
  • Applying Office2007 style
  • Applying Vista style
  • Applying Metro style
  • Appearance customization

Advanced Features

📄 Read: references/advanced-features.md

Read this reference when you need to:

  • Enable edit mode for direct path typing
  • Allow users to type navigation paths
  • Control popup behavior with BarPopup event
  • Set maximum items to display in popups
  • Cancel popup display conditionally
  • Implement advanced navigation scenarios

Key Topics:

  • Edit mode enabling and usage
  • Typing paths directly into NavigationView
  • BarPopup event advanced usage
  • MaximumItemsToDisplay property
  • Popup cancellation logic
  • Quick navigation techniques

Quick Start Example

Here's a minimal example of creating a NavigationView with a three-level hierarchy:

using Syncfusion.Windows.Forms.Tools;
using Syncfusion.Windows.Forms.Tools.Navigation;

// Create NavigationView
NavigationView navigationView1 = new NavigationView();
navigationView1.Width = 400;
navigationView1.Height = 25;
navigationView1.Location = new System.Drawing.Point(20, 20);

// Create root Bar
Bar rootBar = new Bar();
rootBar.Text = "MyComputer";

// Create child Bars
Bar driveC = new Bar();
driveC.Text = "Local Disk (C:)";

Bar driveD = new Bar();
driveD.Text = "Local Disk (D:)";

Bar programFiles = new Bar();
programFiles.Text = "Program Files";

// Build hierarchy
rootBar.Bars.AddRange(new Bar[] { driveC, driveD });
driveC.Bars.Add(programFiles);

// Add root to NavigationView
navigationView1.Bars.Add(rootBar);

// Set initial selection
navigationView1.SelectedBar = rootBar;

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

Result: A breadcrumb navigation showing "MyComputer" with dropdown access to "C:" and "D:".

Common Patterns

File System Navigation Pattern

Mimic Windows Explorer folder navigation:

// Root = Computer
Bar computer = new Bar { Text = "This PC" };

// Drives
Bar cDrive = new Bar { Text = "Local Disk (C:)" };
Bar dDrive = new Bar { Text = "Local Disk (D:)" };

// Common folders
Bar users = new Bar { Text = "Users" };
Bar documents = new Bar { Text = "Documents" };
Bar downloads = new Bar { Text = "Downloads" };

// Build hierarchy
computer.Bars.AddRange(new Bar[] { cDrive, dDrive });
cDrive.Bars.Add(users);
users.Bars.AddRange(new Bar[] { documents, downloads });

navigationView1.Bars.Add(computer);
navigationView1.SelectedBar = computer;

Dynamic Bar Creation Based on Data

Populate NavigationView from data source:

public void LoadFoldersFromPath(string rootPath, Bar parentBar)
{
    try
    {
        var directories = Directory.GetDirectories(rootPath);

        foreach (var dir in directories)
        {
            Bar childBar = new Bar();
            childBar.Text = Path.GetFileName(dir);
            childBar.Tag = dir; // Store full path

            parentBar.Bars.Add(childBar);

            // Optionally load sub-folders
            // LoadFoldersFromPath(dir, childBar);
        }
    }
    catch (UnauthorizedAccessException)
    {
        // Handle permission errors
    }
}

// Usage
Bar rootBar = new Bar { Text = "C:", Tag = @"C:\" };
LoadFoldersFromPath(@"C:\", rootBar);
navigationView1.Bars.Add(rootBar);

Navigation with History Tracking

Enable users to track and return to previous locations:

// Enable history button
navigationView1.ShowHistoryButtons = true;

// Handle BarSelected event to track navigation
navigationView1.BarSelected += (sender, e) =>
{
    string currentPath = GetFullPath(navigationView1.SelectedBar);
    Console.WriteLine($"Navigated to: {currentPath}");

    // Update UI based on selection
    LoadContent(currentPath);
};

// Helper to build full path
private string GetFullPath(Bar bar)
{
    List<string> path = new List<string>();
    Bar current = bar;

    while (current != null)
    {
        path.Insert(0, current.Text);
        current = current.Parent as Bar;
    }

    return string.Join(" > ", path);
}

Custom Navigation Buttons

Add search or refresh buttons to NavigationView:

// Create custom search button
CustomButton searchButton = new CustomButton();
searchButton.Name = "searchButton";
searchButton.Image = Properties.Resources.SearchIcon; // Your icon
searchButton.Appearance = ButtonAppearance.Office2007;

// Handle click
searchButton.Click += (sender, e) =>
{
    // Show search dialog or panel
    ShowSearchPanel();
};

// Add to NavigationView
navigationView1.Controls.Add(searchButton);

Key Properties and Events

Essential Properties

PropertyTypeDescription
BarsBarCollectionCollection of root-level Bars
SelectedBarBarCurrently displayed Bar in the path
ShowHistoryButtonsboolShow/hide history dropdown button
VisualStyleVisualStylesApply Office2007, Vista, or Metro styling
ImageListImageListImage collection for Bar icons

Bar Properties

PropertyTypeDescription
TextstringDisplay text for the Bar
ImageIndexintIndex in NavigationView.ImageList
BarsBarCollectionChild Bars of this Bar
TagobjectStore custom data (e.g., full path)

Important Events

EventDescriptionCommon Use
BarSelectedFires when user selects a BarLoad content for selected location
BarPopupFires before dropdown showsCustomize popup items, set max items
ClickUser clicks the controlHandle general interaction

Common Use Cases

Use Case 1: File Explorer with Edit Mode

Allow users to navigate folders visually or type paths directly:

// Enable edit mode
navigationView1.AllowEdit = true; // If property exists

// Handle path changes
navigationView1.BarSelected += (sender, e) =>
{
    if (navigationView1.SelectedBar.Tag is string path)
    {
        LoadDirectoryContents(path);
    }
};

Use Case 2: Settings Navigation

Guide users through nested settings categories:

Bar settings = new Bar { Text = "Settings" };
Bar appearance = new Bar { Text = "Appearance" };
Bar colors = new Bar { Text = "Colors" };
Bar fonts = new Bar { Text = "Fonts" };

settings.Bars.Add(appearance);
appearance.Bars.AddRange(new Bar[] { colors, fonts });

navigationView1.Bars.Add(settings);
navigationView1.SelectedBar = settings;

Use Case 3: Document Management System

Navigate document categories with custom icons:

// Setup ImageList
ImageList imgList = new ImageList();
imgList.Images.Add("folder", Properties.Resources.FolderIcon);
imgList.Images.Add("doc", Properties.Resources.DocumentIcon);
navigationView1.ImageList = imgList;

// Create hierarchy with images
Bar root = new Bar { Text = "Documents", ImageIndex = 0 };
Bar contracts = new Bar { Text = "Contracts", ImageIndex = 0 };
Bar invoices = new Bar { Text = "Invoices", ImageIndex = 0 };

root.Bars.AddRange(new Bar[] { contracts, invoices });
navigationView1.Bars.Add(root);

Use Case 4: Limited Popup Items for Large Hierarchies

Control dropdown size for folders with many subfolders:

navigationView1.BarPopup += (sender, e) =>
{
    // Limit items to 10 for better UX
    e.MaximumItemsToDisplay = 10;

    // Cancel popup for specific Bars
    if (e.CurrentBar.Text == "EmptyFolder")
    {
        e.Cancel = true;
    }
};

Troubleshooting Tips

Issue: Bars not appearing in NavigationView

  • Solution: Ensure Bars are added to navigationView1.Bars collection, not just created
  • Check: Verify SelectedBar is set to make a Bar visible

Issue: Images not displaying

  • Solution: Assign ImageList to NavigationView, then set ImageIndex on Bars
  • Check: Ensure ImageIndex values are within ImageList bounds

Issue: Dropdown not showing child Bars

  • Solution: Add child Bars to parent's Bars collection: parentBar.Bars.Add(childBar)
  • Check: Verify parent Bar actually has children

Issue: History button not visible

  • Solution: Set navigationView1.ShowHistoryButtons = true

Issue: Visual style not applied

  • Solution: Set VisualStyle property after control initialization
  • Example: navigationView1.VisualStyle = VisualStyles.Office2007;

Next Steps

  1. Start with Getting Started: Read references/getting-started.md to set up the control
  2. Build Hierarchy: Read references/bar-hierarchy.md to create your Bar structure
  3. Add Features: Read remaining references to add dropdown, history, images, and advanced capabilities
  4. Customize Appearance: Apply visual styles to match your application theme
  5. Handle Events: Wire up BarSelected and other events to respond to user navigation

For complete implementation details, proceed through the reference guides in the order listed above.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

32.67%
按下载量换算89

Claude

31.8%
按下载量换算86

Cursor

17.32%
按下载量换算47

Gemini CLI

9.77%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills