microsoft / microsoft/WindowsAppSDK-Samples

Request for complex XAML Islands sample combining WPF and WinUI controls in the same window

Open
#500 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1k
Forks
335
Avg merge
5d 1h
Merged PRs (30d)
8

Description

It would be great to have a more complex use case of XAML Islands with WPF and WinUI. For example, a sample where in the same window one could have WPF content like a Button, and then on the same window have some WinUI ListView.

The sample should demonstrate how to host both WPF and WinUI controls in the same window using XAML Islands. For instance, showing the code/setup for embedding WPF controls (like a Button) and WinUI controls (like ListView with WinUI Buttons) side-by-side .

If any supporting APIs or configuration changes are needed to make this integration work smoothly, those should be documented in the sample, for example create a HwndHost to host the islands on wpf.

Show how one can create xaml controls with templates in both wpf, or winui class library and how those are solved at runtime by the wpf app.

##Use Case

This sample would be useful for developers migrating or modernizing desktop applications, giving them a reference on how to leverage both legacy WPF controls and new WinUI controls in a single app window. It enables gradual modernization and feature enhancement of existing WPF apps using newer WinUI components.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WPF app and the HwndHost approach described in the issue, then identify how the sample can place a WPF Button beside a WinUI ListView containing WinUI Buttons. Done means a documented sample demonstrates both controls in one window, including template resolution for WPF and WinUI class libraries at runtime.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.