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

syncfusion-wpf-datapager同步融合 WPF 数据分页器

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

1,067

周安装

44

GitHub Stars

2

下载量

348
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/syncfusion/wpf-ui-components-skills --skill syncfusion-wpf-datapager

简介

同步融合 WPF 数据分页器组件,用于大数据集的分页导航与加载控制。

  • 适用于长列表浏览、搜索结果分页等需要分批加载数据的 WPF 界面设计。
  • 通过 GitHub 仓库安装,使用 npx skills add 命令添加分页管理技能模块。
  • 使用前应确保宿主支持虚拟化滚动及异步数据加载机制以避免界面卡顿。
  • 建议查看原始文档了解页码跳转、每页数量设置等交互逻辑的实现方式。

SKILL.md

Implementing DataPager

Guide for implementing the Syncfusion WPF DataPager (SfDataPager) to paginate large datasets in WPF applications. The DataPager control provides navigation buttons, numeric page buttons, and flexible data‑binding options for dividing data into manageable pages.

When to Use This Skill

Use this skill when the user needs to:

  • Paginate large datasets in WPF applications
  • Add page navigation controls (first, last, next, previous buttons)
  • Display data in manageable page sizes
  • Implement on-demand paging for large datasets
  • Bind paginated data to any ItemsControl (DataGrid, ListBox, ListView)
  • Customize pagination appearance (colors, display modes, orientation)
  • Handle page change events and validation
  • Create paginated views with numeric page buttons
  • Change page size at runtime
  • Navigate programmatically between pages

Component Overview

SfDataPager is a WPF control that divides data collections into pages and provides navigation UI:

  • Navigation buttons: First, Last, Previous, Next page buttons
  • Numeric buttons: Direct page access (e.g., 1, 2, 3, 4, 5)
  • Auto ellipsis: Shows ellipsis button when page count exceeds numeric button count
  • Flexible binding: Works with any ItemsControl through PagedSource property
  • On-demand paging: Load data dynamically for current page only
  • Events: PageIndexChanging and PageIndexChanged for validation and custom logic
  • Appearance: Customizable colors, display modes, and orientation

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Required assemblies (Syncfusion.SfGrid.WPF, Syncfusion.Data.WPF)
  • Control structure and elements
  • Creating first SfDataPager application
  • Integrating with SfDataGrid
  • Adding SfDataPager to toolbox
  • Theme support and theming

Data Binding and Paging

📄 Read: references/data-binding.md

  • Source and PagedSource properties
  • PageIndex property and events
  • Binding to ListBox, ListView, or other ItemsControls
  • On-demand paging with UseOnDemandPaging
  • LoadDynamicItems method for dynamic data loading
  • PageSize configuration
  • Runtime PageSize changes with ComboBox

Appearance and Styling

📄 Read: references/appearance.md

  • AutoEllipsisMode (After, Before, Both, None)
  • AccentBackground and AccentForeground colors
  • NumericButtonStyle customization
  • DisplayMode options (12 different modes)
  • Orientation (Horizontal, Vertical)

Page Navigation

📄 Read: references/page-navigation.md

  • MoveToFirstPage(), MoveToLastPage() methods
  • MoveToNextPage(), MoveToPreviousPage() methods
  • MoveToPage(int pageIndex) for direct navigation
  • PageIndexChanging event for validation
  • Interacting with users before page changes

Styles and Templates

📄 Read: references/styles-templates.md

  • Editing styles in Expression Blend
  • Editing styles in Visual Studio
  • Edit a Copy vs Create Empty options
  • Custom control templates
  • Resource management

Quick Start Example

Basic SfDataPager with SfDataGrid integration:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sfgrid="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF"
        xmlns:datapager="clr-namespace:Syncfusion.UI.Xaml.Controls.DataPager;assembly=Syncfusion.SfGrid.WPF">

    <Window.DataContext>
        <local:ViewModel/>
    </Window.DataContext>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <!-- DataGrid displays paginated data -->
        <sfgrid:SfDataGrid AutoGenerateColumns="True"
                           ItemsSource="{Binding ElementName=sfDataPager, Path=PagedSource}"/>

        <!-- DataPager provides navigation -->
        <datapager:SfDataPager x:Name="sfDataPager"
                               Grid.Row="1"
                               NumericButtonCount="10"
                               PageSize="10"
                               Source="{Binding OrdersDetails}"/>
    </Grid>
</Window>

Key concepts:

  • Source: Bind to your data collection (e.g., OrdersDetails)
  • PagedSource: Automatically wrapped PagedCollectionView for ItemsControl
  • PageSize: Number of items per page
  • NumericButtonCount: Number of numeric page buttons to display

Common Patterns

Pattern 1: Basic Pagination with DataGrid

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

    <sfgrid:SfDataGrid ItemsSource="{Binding ElementName=sfDataPager, Path=PagedSource}"/>

    <datapager:SfDataPager x:Name="sfDataPager"
                           Grid.Row="1"
                           PageSize="20"
                           Source="{Binding DataCollection}"/>
</Grid>

Pattern 2: Customized Appearance

<datapager:SfDataPager x:Name="sfDataPager"
                       AccentBackground="DodgerBlue"
                       AccentForeground="White"
                       AutoEllipsisMode="Both"
                       NumericButtonCount="5"
                       PageSize="15"
                       Source="{Binding DataCollection}"/>

Pattern 3: Runtime PageSize Change

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="Auto"/>
    </Grid.ColumnDefinitions>

    <sfgrid:SfDataGrid ItemsSource="{Binding ElementName=sfDataPager, Path=PagedSource}"/>

    <ComboBox Name="pageSizeComboBox"
              Grid.Column="1" Grid.Row="1"
              SelectedIndex="0"
              ItemsSource="{Binding PageSizeOptions}"/>

    <datapager:SfDataPager x:Name="sfDataPager"
                           Grid.Row="1"
                           PageSize="{Binding SelectedValue, ElementName=pageSizeComboBox}"
                           Source="{Binding DataCollection}"/>
</Grid>

Pattern 4: On-Demand Paging (Large Datasets)

<datapager:SfDataPager x:Name="sfDataPager"
                       UseOnDemandPaging="True"
                       PageCount="100"
                       PageSize="20"
                       OnDemandLoading="OnDemandDataLoading"/>
private void OnDemandDataLoading(object sender, OnDemandLoadingEventArgs args)
{
    // Load data for current page only
    var pageData = dataSource.Skip(args.StartIndex).Take(args.PageSize);
    sfDataPager.LoadDynamicItems(args.StartIndex, pageData);
}

Pattern 5: Page Change Validation

<datapager:SfDataPager PageIndexChanging="sfDataPager_PageIndexChanging"/>
private void sfDataPager_PageIndexChanging(object sender, PageIndexChangingEventArgs e)
{
    // Validate or prompt user before page change
    if (HasUnsavedChanges())
    {
        var result = MessageBox.Show("Unsaved changes. Continue?",
                                     "Confirm",
                                     MessageBoxButton.YesNo);
        if (result == MessageBoxResult.No)
        {
            e.Cancel = true; // Cancel page navigation
        }
    }
}

Key Properties

PropertyTypeDescription
SourceIEnumerableData collection for paging
PagedSourcePagedCollectionViewPaginated data (bind to ItemsSource)
PageSizeintItems per page (default: 0 = all items)
PageIndexintCurrent page index (0-based)
PageCountintTotal number of pages
NumericButtonCountintNumber of numeric buttons to display
AutoEllipsisModeAutoEllipsisModeEllipsis button placement (After, Before, Both, None)
AccentBackgroundBrushBackground color for navigation/selected buttons
AccentForegroundBrushForeground color for selected button
DisplayModePageDisplayModeWhich buttons to show (e.g., FirstLastPreviousNextNumeric)
OrientationOrientationHorizontal or Vertical layout
UseOnDemandPagingboolEnable on-demand data loading

Key Methods

MethodDescription
MoveToFirstPage()Navigate to first page
MoveToLastPage()Navigate to last page
MoveToNextPage()Navigate to next page
MoveToPreviousPage()Navigate to previous page
MoveToPage(int pageIndex)Navigate to specific page
LoadDynamicItems(int startIndex, IEnumerable items)Load data for on-demand paging

Key Events

EventDescription
PageIndexChangingBefore page changes (cancelable)
PageIndexChangedAfter page changes

Implementation Workflow

When user requests DataPager implementation:

  1. Assess requirements: Determine data size, page size needs, appearance preferences
  2. Choose paging mode:

- Normal paging (small to medium datasets) - On-demand paging (large datasets, millions of records)

  1. Add assemblies: Syncfusion.SfGrid.WPF, Syncfusion.Data.WPF (if using with DataGrid)
  2. Set up data binding: Source → PagedSource → ItemsControl.ItemsSource
  3. Configure appearance: PageSize, NumericButtonCount, AccentColors, DisplayMode
  4. Add event handlers (if needed): PageIndexChanging for validation
  5. Test navigation: Verify all navigation buttons work correctly

Common Use Cases

  • Paginated data grids: Display large datasets in DataGrid with page navigation
  • Document viewers: Navigate through document pages
  • Product catalogs: Browse items across multiple pages
  • Search results: Display search results with pagination
  • Report viewers: Navigate multi-page reports
  • Large list displays: Any scenario with 100+ items that need pagination
  • Lazy loading scenarios: Load data as user navigates pages

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.33%
按下载量换算123

Claude

30.93%
按下载量换算108

Cursor

18.39%
按下载量换算64

Gemini CLI

9.86%
按下载量换算34

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills