Free tools Windows power users keep installed
One-click scans. No signup required.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Short answer: neither gallery is universally better. The former XAML Controls Gallery is now the WinUI 2 Gallery, aimed at UWP projects. The WinUI 3 Gallery is the matching reference for WinUI 3 applications built with the Windows App SDK. Choose the gallery that targets your app’s framework, then confirm that its sample matches your control, API, and package version.
For a new Windows desktop application, Microsoft recommends WinUI 3 as its native UI framework and positions the WinUI 3 Gallery as an interactive way to explore controls and Windows App SDK functionality. For an existing UWP application, WinUI 2 Gallery remains the relevant sample library.
The name changed: “XAML Controls Gallery” now means WinUI 2 Gallery
Search results, bookmarks, screenshots, and older tutorials still use XAML Controls Gallery. Microsoft changed that name in 2022. In a May 12, 2022 announcement, Microsoft WinUI team member Greg Woo wrote: “The XAML Controls Gallery and the WinUI 3 Controls Gallery are getting new names! They will be called the WinUI 2 Gallery and the WinUI 3 Gallery respectively.” The announcement also established the repository layout: WinUI 3 code is on the main branch and WinUI 2 code is on the winui2 branch. Read the announcement at GitHub.
This is more than a branding detail. The two galleries demonstrate different framework generations and application models. Treating them as interchangeable can lead you to copy a sample that requires a different project type, package set, or API surface.
#1 Best Overall
| Current gallery | Former or alternate wording | Primary target | Use it when your project is |
|---|---|---|---|
| WinUI 3 Gallery | WinUI 3 Controls Gallery | WinUI 3 with the Windows App SDK | A new or existing Windows desktop app using the Windows App SDK |
| WinUI 2 Gallery | XAML Controls Gallery | WinUI 2 for UWP | An existing Universal Windows Platform (UWP) app |
The old microsoft/Xaml-Controls-Gallery repository is not a separate current product. Its GitHub address redirects to the shared WinUI-Gallery repository. Use the branch that corresponds to your framework rather than relying on an old repository name.
Why framework match matters more than a feature count
WinUI 2 is a library of controls for UWP apps. WinUI 3 is delivered through the Windows App SDK for Windows desktop apps. A button, navigation view, or data control can look nearly identical in both galleries while the sample uses different APIs, package references, project settings, or lifecycle assumptions.
Before adapting any sample, compare the gallery branch and project type with your application. Check the target framework, Windows App SDK or WinUI package versions, and the sample’s stated requirements. Then copy the smallest useful portion and rebuild it in your own project. A visual match is not proof that the code is portable.
Microsoft’s overview of the framework split is available in WinUI 3 – Windows apps. The Microsoft UI XAML project, which documents the underlying UI technology, is at microsoft/microsoft-ui-xaml on GitHub.
What the WinUI 3 Gallery provides
The WinUI 3 Gallery repository describes the app as a companion for WinUI and Windows App SDK APIs. Its interactive samples let you change properties, see the result, and inspect implementation details instead of reading an isolated code fragment.
Interactive control demonstrations
Each control page is designed to show a working scenario. You can manipulate a control, observe states and layout behavior, and use the displayed markup and code-behind as a starting point. This is particularly useful for controls whose behavior depends on templates, visual states, input modes, or responsive layout rather than a single constructor call.
Markup and code-behind together
The gallery exposes both XAML markup and the associated code-behind. That pairing helps you distinguish declarative layout from event handling and state changes. When transferring a sample, copy only the handlers, resources, and properties your scenario needs; retaining every gallery setting can obscure which values actually matter.
Adaptive UI, design, and accessibility guidance
The examples include adaptive UI scenarios and explain design and accessibility considerations. Use that material when you need more than a control that merely compiles: for example, when a layout must respond to window size, when keyboard and focus behavior matter, or when a visual treatment needs to remain understandable with accessibility features enabled.
Rank #2
- Used Book in Good Condition
Relationship to the broader Windows App SDK samples
The gallery is an interactive control and design reference, not a complete catalog of Windows application features. Microsoft’s samples page also points to the broader Windows App SDK samples repository for areas such as app lifecycle, windowing, and push notifications. Start with the gallery for control behavior; move to the broader samples when the problem concerns an application subsystem rather than a XAML control. The samples index was last updated April 18, 2026, and is available at Samples and tools for Windows development.
What the WinUI 2 Gallery provides
The WinUI 2 Gallery is the documented successor to the XAML Controls Gallery. Microsoft’s UWP documentation describes it as an interactive sample app for UWP controls, styles, design guidance, and capabilities. Its source is maintained in the winui2 branch of the shared WinUI Gallery repository.
UWP-oriented control and style examples
Use this gallery when your application is already a UWP project and you need a control example that fits that app model. It is the safer starting point for understanding how WinUI 2 resources, styles, and capabilities are assembled in UWP rather than assuming a WinUI 3 sample will map directly.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsFinding older documentation without losing the current identity
Older pages may call the app XAML Controls Gallery. Preserve that term when searching for legacy discussions, but verify that the result points to WinUI 2 guidance and the winui2 branch. Do not treat a legacy title as evidence that the sample targets WinUI 3.
Microsoft’s UWP development index explains this transition and links to the current source location: UWP development documentation.
Head-to-head comparison by the decisions developers actually make
The following comparison uses practical selection criteria. It is not a measured ranking: official material does not publish an exhaustive control-by-control parity score or independent quality test for the two galleries.
| Criterion | WinUI 3 Gallery | WinUI 2 Gallery | How to decide |
|---|---|---|---|
| Framework match | WinUI 3 and Windows App SDK desktop apps | WinUI 2 and UWP apps | Choose the column matching the project’s target framework. |
| Control and API exploration | Interactive WinUI 3 controls and Windows App SDK-related functionality | Interactive UWP/WinUI 2 controls, styles, and capabilities | Search the matching gallery first; a similarly named control in the other gallery may use different APIs. |
| Code visibility | Markup and code-behind are shown with samples | Samples provide UWP-oriented implementation guidance | Prefer the sample whose project and packages match your solution. |
| Design and accessibility context | Adaptive UI, design guidance, and accessibility guidance are documented | Design guidance and accessibility-related control context for UWP | Use the guidance that applies to the app model you ship. |
| Build and run requirements | Visual Studio 2022 or later to build; Windows 10 or later to run | Requirements depend on the UWP/WinUI 2 project and version | Check the branch and project instructions before setting up a build. |
| API stability | Some samples use experimental Windows App SDK APIs and are labeled | Use the stability guidance associated with the WinUI 2/UWP version | Do not promote an experimental sample to production without validating the API lifecycle. |
Choose WinUI 3 Gallery when you are building a Windows App SDK desktop app
WinUI 3 Gallery is the direct reference for a new Windows desktop project using WinUI 3. It keeps sample code, package assumptions, and app-model behavior aligned with the technology Microsoft recommends for new native Windows desktop applications.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Typical WinUI 3 use cases
- Starting a new desktop application with the Windows App SDK.
- Learning how a WinUI 3 control behaves at different sizes or input states.
- Inspecting a complete XAML-plus-code-behind example rather than a detached snippet.
- Checking adaptive layout, design, or accessibility guidance while implementing a control.
- Exploring an upcoming Windows App SDK capability, provided you accept the experimental status.
When a WinUI 2 sample is still useful
A WinUI 2 page can help explain a general design concept, but it should not be your implementation authority for a WinUI 3 project. Use it as a conceptual reference only, then locate the equivalent WinUI 3 sample and verify every API and package reference.
Rank #3
Choose WinUI 2 Gallery when your application is UWP
For an existing UWP application using WinUI 2, the WinUI 2 Gallery is the relevant source of truth. Its samples are shaped around UWP’s project model and WinUI 2 controls, styles, and capabilities.
Typical WinUI 2 use cases
- Maintaining a UWP application that already references WinUI 2.
- Adapting a control style or resource dictionary in a UWP solution.
- Checking UWP-specific capability or design behavior.
- Comparing a legacy sample found under the XAML Controls Gallery name with its current WinUI 2 source.
When migration changes the answer
If you are moving from UWP to a Windows App SDK desktop app, do not assume that the WinUI 2 gallery remains the right long-term reference. During migration, use it to understand the existing implementation, then switch to WinUI 3 Gallery samples as you replace controls and update project dependencies.
How to set up and build WinUI 3 Gallery
The repository README lists Visual Studio 2022 or later for building, the Windows application development component, and Windows 10 or later for execution. These are requirements for the gallery build described by the repository; your own application can have additional SDK or Windows App SDK requirements.
- Install Visual Studio 2022 or a later version with the Windows application development workload/component enabled.
- Use Windows 10 or later to run the gallery.
- Clone the official repository:
git clone https://github.com/microsoft/WinUI-Gallery.git. - Open the solution included in the cloned repository in Visual Studio.
- Confirm that you are on the
mainbranch for WinUI 3 samples. Thewinui2branch contains the WinUI 2 code. - Restore packages, select the gallery project as the startup target, and build using the configuration supported by the repository instructions.
- Run the app and navigate to the control or feature you need. Read the sample’s markup, code-behind, and any notes before copying code.
The gallery repository also cautions that it uses an experimental Windows App SDK to demonstrate upcoming features. Samples that depend on experimental APIs are labeled. An experimental example is useful for learning an evolving API, but its signatures or behavior may change or the API may be removed before a stable release.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.A reliable workflow for adapting any gallery sample
1. Identify the target before searching
Write down whether your app is WinUI 3/Windows App SDK or WinUI 2/UWP, along with the framework and package versions in your project. This prevents a search for a generic control name from silently leading you to the wrong gallery.
2. Find the smallest relevant sample
Choose the page that demonstrates the behavior you need: selection, validation, navigation, layout adaptation, styling, or accessibility. A page that merely displays the control may omit the state transitions your application requires.
3. Separate markup, resources, and behavior
Read the sample in three passes. First, identify the XAML elements and properties. Next, locate resources such as styles, templates, converters, or theme values. Finally, inspect code-behind and event handlers. This separation makes it easier to port only the necessary pieces.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →4. Recheck project assumptions
Compare namespaces, package references, target framework settings, and any Windows App SDK dependency with your own project. If the sample uses an experimental API, decide whether you can accept that lifecycle risk or need a stable alternative.
Rank #4
5. Test in your app’s real conditions
Run the adapted code at the window sizes, scaling settings, input modes, and accessibility configurations your application supports. A gallery sample demonstrates a controlled scenario; it does not prove that the same layout works in every production context.
6. Keep attribution and update notes
Record the gallery branch, repository revision, and package versions used when you adapted the sample. This makes future updates easier when a control, style, or experimental API changes.
Common mistakes and how to correct them
Using the old repository name as a framework signal
The phrase XAML Controls Gallery identifies the former name of WinUI 2 Gallery, not a third gallery that sits between WinUI 2 and WinUI 3. Follow the redirect to the shared repository and choose the correct branch.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Copying a visually similar sample across frameworks
Similar appearance does not guarantee compatible code. Recheck the app model, packages, and APIs before porting. If the matching gallery has an equivalent page, prefer it over a direct cross-framework copy.
Treating an experimental sample as stable documentation
WinUI 3 Gallery labels examples that use experimental Windows App SDK APIs. Read those labels and the API status before committing the code to a production dependency. Build a fallback plan if the feature is not yet stable.
Expecting the gallery to explain every Windows feature
Controls and UI behavior are the gallery’s strength. Lifecycle, windowing, and push-notification scenarios belong in the broader Windows App SDK samples linked from Microsoft’s samples page.
Judging quality by repository popularity
No official source establishes a sample-count comparison, parity score, or independent quality ranking that would make one gallery objectively superior. A popularity number would not answer the framework-fit question.
Recommended Free Tools
A practical decision checklist
- Project type: WinUI 3/Windows App SDK means WinUI 3 Gallery; WinUI 2/UWP means WinUI 2 Gallery.
- Legacy search term: If a tutorial says XAML Controls Gallery, translate it to WinUI 2 Gallery before following its source links.
- Sample purpose: Use the gallery for controls, styles, layout, design, and accessibility; use broader Windows App SDK samples for lifecycle and platform subsystems.
- Version fit: Match the sample’s framework and package versions to your project.
- Stability: Treat labeled experimental APIs as moving targets.
- Validation: Test adapted code under your actual window sizes, input methods, scaling, and accessibility requirements.
Verdict: the better gallery is the one that matches your app
For new Windows desktop development with WinUI 3 and the Windows App SDK, start with WinUI 3 Gallery. For an existing UWP application using WinUI 2, use WinUI 2 Gallery. The former XAML Controls Gallery is not a competing third option; it is the earlier name for the UWP-oriented gallery.
That framework-first rule is more dependable than a feature-count contest. Both galleries are useful interactive references, but their samples are tied to different project models and APIs. Select the matching gallery, verify the sample’s version and stability, and use the broader Windows App SDK samples when your question extends beyond XAML controls.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

