Skip to content

Switch gallery to use experimental self-contained WinAppSDK and showcase new windowing APIs - #2229

Open
Jesse Collins (JesseCol) wants to merge 8 commits into
mainfrom
user/jecollin/gallery-with-new-window-apis
Open

Switch gallery to use experimental self-contained WinAppSDK and showcase new windowing APIs#2229
Jesse Collins (JesseCol) wants to merge 8 commits into
mainfrom
user/jecollin/gallery-with-new-window-apis

Conversation

@JesseCol

@JesseCol Jesse Collins (JesseCol) commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

This content was largely generated by AI. AI makes mistakes.

Description

Make Gallery use an experimental WinAppSDK build

  • Target Windows App SDK 2.4.1-experimental with the normal Debug/Release configurations. Bundle WinAppSDK with Gallery and the unit-test host using self-contained deployment.
  • Fix VersionHelper startup failures by reading SDK-generated version information instead of querying the framework-only Insights resource DLL. Show the SDK channel on Home and Settings, including Windows App SDK 2.4 (experimental), and update the regression test.
  • Remove the incorrect App Notifications warning about Singleton-package requirements and self-contained deployment.
  • Document the experimental SDK dependency. NativeAOT remains disabled.

Showcase the new windowing APIs

  • Combine stable window creation and experimental sizing on the Windowing APIs page. The stable example retains AppWindow.ResizeClient(); the other examples demonstrate Window.Width, Height, MinWidth, MinHeight, MaxWidth, and MaxHeight.
  • Provide concise C# examples and equivalent XAML property declarations in the usual sample tabs. The selected size options update both versions.
  • Use per-example experimental labels and warnings on this mixed page, while retaining page-level tagging support for entirely experimental pages. This builds on Adds experimental tags to samples #2230 and Allows individual samples to be marked experimental #2231; the PagerControl sample is not included.
  • Keep TabView and AppWindow examples, including the modal sample, on their original APIs. The former Create Multiple Windows example moves to the combined page without changing its sizing API.
  • Use the new properties internally in MainWindow for minimum sizing and persistence across launches, supporting packaged and unpackaged storage.
  • Remove the unused native min/max sizing shim, while retaining the helper still needed by the existing TabView sample.

Motivation and Context

Gallery should demonstrate upcoming WinUI features while clearly distinguishing experimental examples from stable guidance. Shared tags support both entirely experimental pages and mixed pages with individually marked examples.

Self-contained deployment avoids a dependency on an experimental WinAppSDK framework package. It does not change the experimental SDK's support status or guarantee Store certification.

The Windowing examples distinguish the physical pixels accepted by AppWindow.ResizeClient() from the display-scaled client dimensions used by the experimental Window sizing properties.

How Has This Been Tested?

Windows x64, Visual Studio 2022, .NET 9, WinAppSDK 2.4.1-experimental.

  • UI tests: passed locally on an earlier revision (Jesse's run); not rerun after the combined-page and maximum-size changes.
  • Unit tests: one reported Canvas test failure due to missing GalleryTileGridStyle, which appears unrelated; that test and its resource setup are unchanged from main. The VersionHelper regression passed separately.
  • Build/package: the Debug/x64 solution built after integrating Allows individual samples to be marked experimental #2231; the app also builds after the snippet updates and PagerControl removal. An earlier Release MSIX bundled the runtime without a WinAppSDK framework dependency.
  • Window behavior/snippets: main-window persistence, minimum sizing, and version display were checked at 100% scaling. All 256 minimum/maximum combinations include the initial size; XAML and C# size values match across all dropdown combinations. Jesse reviewed the combined page locally; screenshot below.

Not tested: latest maximum-size interactions, multi-monitor DPI transitions, clean-machine installation, or Store certification. The unrelated test-host resource fix is not included in this PR.

Screenshots (if appropriate):

Combined Windowing APIs page, captured locally by Jesse:

Windowing APIs page with a stable window-creation example and individually marked experimental sizing examples

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)

Target one experimental SDK across normal configurations, bundle its runtime, and migrate appropriate samples to Window sizing properties. Keep AppWindow-focused examples unchanged, fix self-contained version reporting, and remove obsolete sizing helpers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@JesseCol Jesse Collins (JesseCol) changed the title Use experimental self-contained WinAppSDK and new window sizing APIs Switch gallery to use experimental self-contained WinAppSDK and showcase new windowing APIs Sep 11, 2026
@JesseCol
Jesse Collins (JesseCol) marked this pull request as ready for review September 11, 2026 17:42
## Description

Clearly highlights when a sample is using experimental APIs, and adds
PagerControl examples.

## How Has This Been Tested?
Manual testing

## Screenshots (if appropriate):

<img width="676" height="408" alt="image"
src="https://github.com/user-attachments/assets/63021d03-151b-412e-a985-bc7b09036467"
/>
<img width="1107" height="512" alt="image"
src="https://github.com/user-attachments/assets/811d5353-7108-486f-8c19-20bf28ecd982"
/>

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] 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)
Restore existing window samples to stable APIs, add a Windowing page using shared experimental tags, and display the SDK channel on Home and Settings. Keep the unrelated test-host resource fix out of this commit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## Description
Allows individual samples to be marked experimental
Also merges the two windowing samples into one.

## 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. -->

## Screenshots (if appropriate):
<img width="806" height="1063" alt="image"
src="https://github.com/user-attachments/assets/be2064dd-f268-45bc-969b-5e0719cba976"
/>

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] 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)
Carry MaxWidth and MaxHeight into the combined Windowing page, preserve the stable ResizeClient example, clarify units per example, and remove the InkToolbar catalogue entry whose missing page broke the build.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Provide concise C# alternatives and XAML declarations for window sizing and constraints. Remove the PagerControl sample while preserving the shared experimental-label support.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants