Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

syncfusion-winui-comboboxSynfusion WinUI 组合框

Agent Skill

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

总安装

564

周安装

24

GitHub Stars

公开资料未说明

下载量

198
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/syncfusion/winui-ui-components-skills --skill syncfusion-winui-combobox

简介

用于查找、检索和筛选相关信息。

  • 适合根据关键词或任务场景快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 安装前需确认权限范围和维护状态,避免触发联网或文件读写操作。
  • syncfusion-winui-combobox 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Implementing ComboBoxes (Syncfusion WinUI)

When to Use This Skill

Use this skill when the user needs to:

  • Implement a dropdown selection control in WinUI applications
  • Enable single or multiple item selection from a list
  • Add filtering and searching capabilities to a dropdown
  • Create an editable dropdown with auto-completion
  • Display selected items as tokens or delimiter-separated values
  • Group dropdown items by categories
  • Customize dropdown appearance with templates
  • Handle user input validation and invalid entries
  • Implement keyboard navigation in dropdowns

Component Overview

The Syncfusion WinUI ComboBox (SfComboBox) is a feature-rich dropdown selection control that supports:

  • Selection Modes: Single and multiple selection with checkbox support
  • Filtering: Built-in filtering with StartsWith or Contains modes
  • Editing: Editable and non-editable modes with auto-completion
  • Display Modes: Token display or delimiter-separated display for multiple selections
  • Searching: Text search with highlighting
  • Grouping: Organize items into categories
  • Customization: Extensive template and styling options
  • Keyboard Support: Full keyboard navigation and shortcuts
  • Accessibility: WCAG compliant with screen reader support

⚠️ Security Considerations

When using ComboBox with external data sources or custom filtering:

  • Data Source Security: Only bind ItemsSource to trusted internal data sources. Validate any external data before displaying.
  • Image Binding: Do not bind Image.Source to untrusted external URLs. Use embedded resources (ms-appx:///) or local files (file:///) instead.
  • Custom Filtering: If implementing IComboBoxFilterBehavior with external APIs, always whitelist allowed domains and sanitize responses.
  • User Input: In editable mode, validate and sanitize user input, especially if passed to backend services.

When to use ComboBox vs. other dropdowns:

  • Use ComboBox when: You need filtering, editing, or multiple selection with tokens
  • Use DropDownList when: You need simple single-selection without editing
  • Use MultiSelect Dropdown when: You need multiple selection without tokens (checkbox only)
  • Use AutoComplete when: You need type-ahead suggestion without dropdown list persistence

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Installing NuGet package (Syncfusion.Editors.WinUI)
  • Installing NuGet package (Syncfusion.Editors.WinUI)
  • Note: make sure to update the Syncfusion.Editors.WinUI NuGet package to the latest available version before release.
  • Basic ComboBox implementation in XAML and C#
  • Populating items with SfComboBoxItem
  • Data binding with ItemsSource
  • Setting DisplayMemberPath and TextMemberPath
  • Customizing SelectionBox UI

Selection Modes

📄 Read: references/selection.md

  • Single selection (UI and programmatic)
  • SelectionChangeTrigger (Committed vs Always)
  • Multiple selection with checkboxes
  • Delimiter display mode for multiple selections
  • Token display mode with removable tokens
  • Hiding/showing checkboxes
  • Auto-append UI types (TextWithSelection vs Text)
  • SelectionChanged and SelectionChanging events

Filtering and Searching

📄 Read: references/filtering.md

  • Enabling filtering with IsFilteringEnabled
  • Filter modes (StartsWith, Contains)
  • TextSearchMode configuration
  • Custom filtering with IComboBoxFilterBehavior
  • Implementing GetMatchingIndexes for custom logic
  • Filter examples and patterns

📄 Read: references/searching.md

  • Text search functionality
  • IsTextSearchEnabled property
  • Auto-complete behavior
  • Highlighting search results
  • Search customization options

Editing Modes

📄 Read: references/editing.md

  • Editable vs non-editable modes (IsEditable property)
  • Auto-completion and text appending
  • Setting null values with AllowNull
  • Opening dropdown programmatically (IsDropDownOpen)
  • Handling invalid input with InputSubmitted event
  • Input validation patterns

Grouping and Organization

📄 Read: references/grouping.md

  • Grouping items by category
  • GroupMemberPath configuration
  • Customizing group headers
  • Group templates and styling
  • Sorting within groups

UI Customization

📄 Read: references/ui-customization.md

  • ItemTemplate for dropdown items
  • SelectionBoxItemTemplate for selected item display
  • Header and footer templates
  • Styling ComboBox elements
  • Theme customization
  • ComboBoxTokenItem styling for token mode
  • Custom template examples

Keyboard and Advanced Features

📄 Read: references/keyboard-and-advanced.md

  • Keyboard navigation shortcuts
  • Leading and trailing views
  • Watermark/placeholder text (PlaceholderText)
  • Accessibility features
  • Performance optimization for large datasets
  • Troubleshooting common issues

Quick Start Example

Basic Single-Selection ComboBox

<Window xmlns:editors="using:Syncfusion.UI.Xaml.Editors">
    <editors:SfComboBox x:Name="comboBox"
                        Width="250"
                        PlaceholderText="Select a social media"
                        ItemsSource="{Binding SocialMedias}"
                        DisplayMemberPath="Name"
                        TextMemberPath="Name" />
</Window>
// Model
public class SocialMedia
{
    public string Name { get; set; }
    public int ID { get; set; }
}

// ViewModel
public class SocialMediaViewModel
{
    public ObservableCollection<SocialMedia> SocialMedias { get; set; }

    public SocialMediaViewModel()
    {
        SocialMedias = new ObservableCollection<SocialMedia>
        {
            new SocialMedia { Name = "Facebook", ID = 0 },
            new SocialMedia { Name = "Twitter", ID = 1 },
            new SocialMedia { Name = "Instagram", ID = 2 }
        };
    }
}

// Set DataContext
comboBox.DataContext = new SocialMediaViewModel();

Editable ComboBox with Filtering

<editors:SfComboBox x:Name="comboBox"
                    Width="250"
                    IsEditable="True"
                    IsFilteringEnabled="True"
                    TextSearchMode="StartsWith"
                    PlaceholderText="Type to filter..."
                    ItemsSource="{Binding Items}"
                    DisplayMemberPath="Name"
                    TextMemberPath="Name" />

Multiple Selection with Tokens

<editors:SfComboBox x:Name="comboBox"
                    Width="250"
                    SelectionMode="Multiple"
                    MultiSelectionDisplayMode="Token"
                    IsEditable="True"
                    ItemsSource="{Binding Items}"
                    DisplayMemberPath="Name"
                    TextMemberPath="Name" />

Common Patterns

Pattern 1: Editable Dropdown with Auto-Complete

When the user types, automatically filter and suggest matching items:

<editors:SfComboBox IsEditable="True"
                    IsFilteringEnabled="True"
                    TextSearchMode="StartsWith"
                    IsTextSearchEnabled="True"
                    ItemsSource="{Binding Cities}"
                    DisplayMemberPath="CityName"
                    TextMemberPath="CityName" />

Key Configuration:

  • IsEditable="True": Enables text input
  • IsFilteringEnabled="True": Filters items as user types
  • TextSearchMode="StartsWith": Filters items starting with entered text
  • IsTextSearchEnabled="True": Auto-appends first match to typed text

Pattern 2: Multiple Selection with Custom Delimiter

Display multiple selected items separated by a custom delimiter:

<editors:SfComboBox SelectionMode="Multiple"
                    MultiSelectionDisplayMode="Delimiter"
                    DelimiterText=" | "
                    ItemsSource="{Binding Items}"
                    DisplayMemberPath="Name"
                    TextMemberPath="Name" />
// Access selected items
var selectedItems = comboBox.SelectedItems;
foreach (var item in selectedItems)
{
    // Process each selected item
}

Pattern 3: Token Mode with Custom Token Template

Display selected items as removable tokens with custom styling:

<editors:SfComboBox SelectionMode="Multiple"
                    MultiSelectionDisplayMode="Token"
                    ItemsSource="{Binding Items}"
                    DisplayMemberPath="Name"
                    TextMemberPath="Name">
    <editors:SfComboBox.TokenItemTemplate>
        <DataTemplate>
            <Grid Background="LightBlue"
                  Padding="8,4"
                  CornerRadius="4">
                <TextBlock Text="{Binding Name}"
                          Foreground="DarkBlue" />
            </Grid>
        </DataTemplate>
    </editors:SfComboBox.TokenItemTemplate>
</editors:SfComboBox>

Pattern 4: Handling Invalid Input

Validate and handle user input that doesn't match any items:

<editors:SfComboBox x:Name="comboBox"
                    IsEditable="True"
                    InputSubmitted="OnInputSubmitted"
                    ItemsSource="{Binding Items}"
                    DisplayMemberPath="Name"
                    TextMemberPath="Name" />
private async void OnInputSubmitted(object sender, ComboBoxInputSubmittedEventArgs e)
{
    // Option 1: Show error message
    var dialog = new ContentDialog
    {
        Content = $"'{e.Text}' is not a valid option. Please select from the list.",
        CloseButtonText = "Close"
    };
    dialog.XamlRoot = this.Content.XamlRoot;
    await dialog.ShowAsync();

    // Option 2: Add new item dynamically (for multiple selection)
    // e.Item = new YourModel { Name = e.Text, ID = comboBox.Items.Count };

    // Option 3: Prevent selection
    // e.Handled = true;
}

Pattern 5: Custom Filtering Logic

Implement custom filtering for complex scenarios:

public class CustomFilterBehavior : IComboBoxFilterBehavior
{
    public List<int> GetMatchingIndexes(SfComboBox source, ComboBoxFilterInfo filterInfo)
    {
        var filteredList = new List<int>();
        var items = source.Items.OfType<YourModel>().ToList();

        // Custom filtering logic - search in multiple properties
        filteredList.AddRange(
            from item in items
            where item.Name.Contains(filterInfo.Text, StringComparison.OrdinalIgnoreCase) ||
                  item.Category.Contains(filterInfo.Text, StringComparison.OrdinalIgnoreCase)
            select items.IndexOf(item)
        );

        return filteredList;
    }
}
<editors:SfComboBox ItemsSource="{Binding Items}"
                    IsEditable="True"
                    IsFilteringEnabled="True"
                    DisplayMemberPath="Name"
                    TextMemberPath="Name">
    <editors:SfComboBox.FilterBehavior>
        <local:CustomFilterBehavior />
    </editors:SfComboBox.FilterBehavior>
</editors:SfComboBox>

Pattern 6: Programmatic Selection Management

Control selection through code for dynamic scenarios:

// Single selection
comboBox.SelectedIndex = 2;
comboBox.SelectedItem = specificItem;

// Multiple selection
comboBox.SelectedItems.Add(item1);
comboBox.SelectedItems.Add(item2);

// Clear selection
comboBox.SelectedItems.Clear();

// React to selection changes
comboBox.SelectionChanged += (sender, e) =>
{
    foreach (var added in e.AddedItems)
    {
        // Handle newly selected items
    }

    foreach (var removed in e.RemovedItems)
    {
        // Handle deselected items
    }
};

Key Properties

Data Binding

  • ItemsSource: Collection of items to display (IEnumerable)
  • DisplayMemberPath: Property name shown in dropdown list
  • TextMemberPath: Property name shown in selection box
  • SelectedItem: Currently selected item (single selection)
  • SelectedItems: Collection of selected items (multiple selection)
  • SelectedIndex: Index of selected item (single selection)

Selection Configuration

  • SelectionMode: Single or Multiple selection
  • MultiSelectionDisplayMode: Delimiter or Token for multiple selection
  • DelimiterText: Character(s) separating items in delimiter mode (default: ",")
  • IsMultiSelectCheckBoxEnabled: Show/hide checkboxes in dropdown (default: true)
  • SelectionChangeTrigger: When to update selection - Committed or Always

Editing and Filtering

  • IsEditable: Enable/disable text editing (default: false)
  • IsFilteringEnabled: Enable/disable filtering (default: false)
  • TextSearchMode: Filter mode - StartsWith or Contains
  • IsTextSearchEnabled: Enable/disable auto-complete (default: true)
  • AllowNull: Allow null selection when text is cleared (default: false)

Display and UI

  • PlaceholderText: Watermark text when no selection
  • IsDropDownOpen: Programmatically open/close dropdown
  • SelectionBoxItemTemplate: Template for selected item display
  • ItemTemplate: Template for dropdown list items
  • HeaderTemplate: Template for dropdown header
  • FooterTemplate: Template for dropdown footer

Grouping

  • GroupMemberPath: Property name for grouping items

Common Use Cases

Use Case 1: Country/State Selection

Two-level dependent dropdowns:

<editors:SfComboBox x:Name="countryComboBox"
                    PlaceholderText="Select Country"
                    ItemsSource="{Binding Countries}"
                    SelectionChanged="OnCountryChanged"
                    DisplayMemberPath="Name"
                    TextMemberPath="Name" />

<editors:SfComboBox x:Name="stateComboBox"
                    PlaceholderText="Select State"
                    ItemsSource="{Binding States}"
                    DisplayMemberPath="Name"
                    TextMemberPath="Name" />
private void OnCountryChanged(object sender, ComboBoxSelectionChangedEventArgs e)
{
    if (e.AddedItems.Count > 0)
    {
        var country = e.AddedItems[0] as Country;
        // Update states collection based on selected country
        viewModel.LoadStates(country.ID);
    }
}

Use Case 2: Tag Selection for Blog Posts

Multi-select with token display for selecting multiple tags:

<editors:SfComboBox SelectionMode="Multiple"
                    MultiSelectionDisplayMode="Token"
                    IsEditable="True"
                    PlaceholderText="Add tags..."
                    ItemsSource="{Binding AvailableTags}"
                    InputSubmitted="OnTagInputSubmitted"
                    DisplayMemberPath="TagName"
                    TextMemberPath="TagName" />

Use Case 3: Searchable Employee Directory

Editable dropdown with filtering for quick employee lookup:

⚠️ Security Note: When displaying employee photos or external images, ensure images are loaded from trusted internal sources only. Do not bind to external URLs without validation.

<editors:SfComboBox IsEditable="True"
                    IsFilteringEnabled="True"
                    TextSearchMode="Contains"
                    PlaceholderText="Search employee..."
                    ItemsSource="{Binding Employees}"
                    DisplayMemberPath="FullName"
                    TextMemberPath="FullName">
    <editors:SfComboBox.ItemTemplate>
        <DataTemplate>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <!-- IMPORTANT: Only use internal/trusted image sources -->
                <Ellipse Width="32" Height="32" Margin="8">
                    <Ellipse.Fill>
                        <ImageBrush ImageSource="{Binding PhotoUrl}" />
                    </Ellipse.Fill>
                </Ellipse>
                <StackPanel Grid.Column="1" VerticalAlignment="Center">
                    <TextBlock Text="{Binding FullName}" FontWeight="SemiBold" />
                    <TextBlock Text="{Binding Department}"
                              FontSize="12"
                              Foreground="Gray" />
                </StackPanel>
            </Grid>
        </DataTemplate>
    </editors:SfComboBox.ItemTemplate>
</editors:SfComboBox>

Use Case 4: Settings Panel with Grouped Options

Group related configuration options:

<editors:SfComboBox ItemsSource="{Binding Settings}"
                    GroupMemberPath="Category"
                    DisplayMemberPath="Name"
                    TextMemberPath="Name">
    <editors:SfComboBox.GroupStyle>
        <GroupStyle>
            <GroupStyle.HeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Key}"
                              FontWeight="Bold"
                              Foreground="DarkBlue"
                              Margin="8,4" />
                </DataTemplate>
            </GroupStyle.HeaderTemplate>
        </GroupStyle>
    </editors:SfComboBox.GroupStyle>
</editors:SfComboBox>

Best Practices

  1. Always set both DisplayMemberPath and TextMemberPath when binding to complex objects
  2. Use IsEditable="True" with IsFilteringEnabled="True" for better user experience with large lists
  3. Handle InputSubmitted event when using editable mode to validate user input
  4. Choose appropriate TextSearchMode: Use StartsWith for predictable lists, Contains for flexible searching
  5. Use Token mode for multiple selection when space allows, Delimiter mode for compact display
  6. Implement custom FilterBehavior for complex filtering scenarios (multiple properties, fuzzy matching)
  7. Set PlaceholderText to guide users on what to select
  8. Use SelectionChangeTrigger="Always" for real-time updates, Committed for better performance
  9. Enable AllowNull in editable mode if null selection is valid for your use case
  10. Customize ItemTemplate for rich visual representation with images, icons, or multiple text lines

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

31.65%
按下载量换算63

Claude

31.45%
按下载量换算62

Cursor

20.36%
按下载量换算40

Gemini CLI

10.14%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills