Skip to content

TableView samples: dedicated TableView navigation group - #2252

Closed
Pranav Gupta (pranav-gupta-msft) wants to merge 3 commits into
mainfrom
users/pragupta/table-view-samples-type1-v0.01
Closed

Pranav Gupta (pranav-gupta-msft) wants to merge 3 commits into
mainfrom
users/pragupta/table-view-samples-type1-v0.01

Conversation

@pranav-gupta-msft

@pranav-gupta-msft Pranav Gupta (pranav-gupta-msft) commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Description

Adds a new top-level TableView navigation group with one small, focused sample page per feature: sorting, filtering, grouping, column resizing, cell and header tooltips, editable cells, cell templates, frozen columns, grid lines, empty template, and selection. The existing TableView scenario page from #2250 moves into this group as "TableView overview".

Alternative layout (single page under Collections): #2253

How Has This Been Tested?

  • Built WinUIGallery (Debug, x64) and regenerated catalog/windows-samples.json.
  • Ran each sample and drove it through UI Automation: sort headers present, filter narrows 12 → 5 rows and restores, grouping by department (5 groups) with expand/collapse all, resize grippers (none on the locked column), frozen-column toggle, all grid-line modes, empty template on/off, selection output and SelectionMode=None.
  • Screenshots below are rendered from the running app.
  • Not exercised: pointer-driven interactions (double-click editing, hover tooltips, dragging to resize).

Notes

  • Builds on Add tableview sample #2250 (its two commits are included) for the 2.5.4-experimental bump and TabularControlsResources.
  • In this TableView build, UIA GridPattern.GetItem on the table crashes the app (AV in Microsoft.UI.Xaml.dll) and cells aren't exposed to UIA. That's a control issue, not a sample issue, but it may affect the Axe scan.

Screenshots

TableView group

Feature screenshots

Sorting

Sorting

Filtering

Filtering

Grouping

Grouping

Column resizing

Column resizing

Cell and header tooltips

Cell and header tooltips

Editable cells

Editable cells

Cell templates

Cell templates

Frozen columns

Frozen columns

Grid lines

Grid lines

Empty template

Empty template

Selection

Selection

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
Moves the TableView overview into a new top-level TableView group and adds simple, focused pages for sorting, filtering, grouping, column resizing, header and cell tooltips, editable cells, cell templates, frozen columns, grid lines, empty template, and selection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8aa3a92f-50d8-446c-9a4c-1a386a88e902
Niels Laute (niels9001) added a commit that referenced this pull request Sep 30, 2026
Adapt selected capabilities from #2252 and #2253 into five focused examples, with combined filtering/grouping, richer cell templates, frozen columns in Basic, and advanced presentation options. Refresh the generated catalog, including the DataGrid icon, to fix PR validation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@niels9001

Copy link
Copy Markdown
Collaborator

Selected changes from your TableView feature samples have been cherry-picked at the sample level and adapted into #2250 (user/dotmorten/tableview), now pushed in bb631d2. That branch combines filtering/grouping, richer cell templates, frozen columns in Basic, and advanced grid-line options while retaining a single page under Collections. Closing this alternative PR in favor of #2250. Thanks Pranav Gupta (@pranav-gupta-msft) for the focused samples.

@niels9001 Niels Laute (niels9001) mentioned this pull request Sep 30, 2026
2 of 3 tasks
Niels Laute (niels9001) added a commit that referenced this pull request Sep 30, 2026
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
Adds five capability-focused examples for the experimental native
TableView, under Collections between PullToRefresh and TreeView:

- Basic: sorting, single-row selection, resizing, and a toggle to freeze
the first column while scrolling horizontally.
- Filtering and grouping: one shared TableViewSource, with a retained
filter when changing grouping, expand/collapse commands, and an
empty-result template.
- Custom cell templates: ID, avatar/two-line Item, themed Status badge,
progress/numeric Value, and read-only Rating columns.
- Editing and validation: editable cells, required-name validation, and
a read-only option.
- Advanced: density, grid-line choices, alternating backgrounds, empty
state, and 1,000 virtualized rows.

Adds introductory, copyable App.xaml setup above the examples, showing
TabularControlsResources immediately after XamlControlsResources in the
merged resource dictionaries. Reuses the gallery's SampleCodePresenter
and its existing Copy button.

Selected changes from @pranav-gupta-msft's TableView alternatives (#2252
and #2253) have been cherry-picked at the sample level and adapted into
this branch. This keeps one Collections page and avoids duplicate
feature sections rather than applying the alternative commits wholesale.
Thanks for the focused feature samples.

Uses the DataGrid control image and refreshes the generated sample
catalog.

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Showcase the Windows App SDK 2.5.4-experimental TableView by capability
rather than business scenario, and consolidate the alternative sample
approaches into #2250.

PR validation failed
`ManifestUpToDateTests.CommittedManifest_MatchesFreshGeneration`. The
original icon/configuration update left the catalog stale; subsequently,
CI's automatic merge combined TableView and main's InkCanvas addition
but retained `controlCount: 124` instead of 125. This branch
synchronizes main and its current catalog exporter, then regenerates and
commits the complete catalog without changing or bypassing the guard.

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
Windows, x64, .NET SDK 10.0.401. `$testOutput` and `$previewOutput`
below were separate temporary output directories; the packaged Debug
output supplies the resources needed by the native tests.

**Passed - catalog generation with the main-synchronized exporter (125
controls, 341 samples):**
```powershell
dotnet run --no-restore --project tools\CatalogExporter -- generate
```

**Passed - the complete catalog test suite, 157 tests, including catalog
freshness and the copyable resource setup's placement, XML, namespaces,
and dictionary ordering:**
```powershell
dotnet test tests\WinUIGallery.CatalogExporter.Tests\WinUIGallery.CatalogExporter.Tests.csproj --no-restore --nologo --verbosity minimal
```

**Passed - main-synchronized packaged Debug/x64 build, before the
resource-introduction-only change:**
```powershell
dotnet build WinUIGallery\WinUIGallery.csproj --no-restore -c Debug -p:Platform=x64 -p:BuildAllAppFlavors=false -p:AppxBundle=Never "-p:OutDir=$testOutput" --nologo --verbosity minimal
```

**Passed - TableView model tests, 10 tests, on the main-synchronized
build:**
```powershell
dotnet test tests\WinUIGallery.UnitTests\WinUIGallery.UnitTests.csproj --no-restore -c Debug -p:IsTestProject=true -p:Platform=x64 -p:BuildAllAppFlavors=false -p:BuildProjectReferences=false -p:AppxBundle=Never "-p:OutDir=$testOutput" --filter 'FullyQualifiedName~TableViewSampleItemTests' --nologo --verbosity minimal
```

**Passed - final unpackaged Debug/x64 build, including the resource
introduction:**
```powershell
dotnet build WinUIGallery\WinUIGallery.csproj --no-restore -c Debug-Unpackaged -p:Platform=x64 -p:PublishSingleFile=false -p:BuildAllAppFlavors=false -p:AppxBundle=Never "-p:OutDir=$previewOutput" --nologo --verbosity minimal
```

Earlier live UI checks verified trimmed/category/name filtering,
changing grouping without clearing the query, empty results and
restoration, group commands, freezing/unfreezing ID during horizontal
scrolling, and all five custom-template columns rendering without
clipping. Template-header sorting could not be conclusively exercised
through background input; full Axe and High Contrast checks were not
run.

## Screenshots (if appropriate):
Original preview screenshots, before the capability-focused
consolidation:

<img width="1229" height="826" alt="image"
src="https://github.com/user-attachments/assets/9bc80362-f94b-4587-8546-b5e11ee1b07b"
/>
<img width="1219" height="489" alt="image"
src="https://github.com/user-attachments/assets/c19a0fd2-2d7d-451d-b94a-da8d8b963d8a"
/>
<img width="1213" height="538" alt="image"
src="https://github.com/user-attachments/assets/7772a219-14aa-4a95-bece-6685fda43a10"
/>

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)

---------

Co-authored-by: Niels Laute <nielslaute@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants