Skip to content

Commit 2d364ad

Browse files
authored
move XAML Islands docs to UWP (#6340)
1 parent 68163bd commit 2d364ad

24 files changed

Lines changed: 71 additions & 41 deletions

.openpublishing.redirection.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10719,6 +10719,41 @@
1071910719
"source_path": "hub/apps/design/basics/navigation-history-and-backwards-navigation.md",
1072010720
"redirect_url": "/windows/apps/develop/ui/navigation/navigation-history-and-backwards-navigation",
1072110721
"redirect_document_id": false
10722+
},
10723+
{
10724+
"source_path": "hub/apps/desktop/modernize/xaml-islands/advanced-scenarios-xaml-islands-cpp.md",
10725+
"redirect_url": "/windows/uwp/xaml-islands/advanced-scenarios-xaml-islands-cpp",
10726+
"redirect_document_id": false
10727+
},
10728+
{
10729+
"source_path": "hub/apps/desktop/modernize/xaml-islands/host-custom-control-with-xaml-islands.md",
10730+
"redirect_url": "/windows/uwp/xaml-islands/host-custom-control-with-xaml-islands",
10731+
"redirect_document_id": false
10732+
},
10733+
{
10734+
"source_path": "hub/apps/desktop/modernize/xaml-islands/host-custom-control-with-xaml-islands-cpp.md",
10735+
"redirect_url": "/windows/uwp/xaml-islands/host-custom-control-with-xaml-islands-cpp",
10736+
"redirect_document_id": false
10737+
},
10738+
{
10739+
"source_path": "hub/apps/desktop/modernize/xaml-islands/host-standard-control-with-xaml-islands.md",
10740+
"redirect_url": "/windows/uwp/xaml-islands/host-standard-control-with-xaml-islands",
10741+
"redirect_document_id": false
10742+
},
10743+
{
10744+
"source_path": "hub/apps/desktop/modernize/xaml-islands/host-standard-control-with-xaml-islands-cpp.md",
10745+
"redirect_url": "/windows/uwp/xaml-islands/host-standard-control-with-xaml-islands-cpp",
10746+
"redirect_document_id": false
10747+
},
10748+
{
10749+
"source_path": "hub/apps/desktop/modernize/xaml-islands/using-the-xaml-hosting-api.md",
10750+
"redirect_url": "/windows/uwp/xaml-islands/using-the-xaml-hosting-api",
10751+
"redirect_document_id": false
10752+
},
10753+
{
10754+
"source_path": "hub/apps/desktop/modernize/xaml-islands/xaml-islands.md",
10755+
"redirect_url": "/windows/uwp/xaml-islands/xaml-islands",
10756+
"redirect_document_id": false
1072210757
}
1072310758
]
1072410759
}

hub/apps/desktop/modernize/index.md

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Add modern XAML user interfaces, create MSIX packages, and incorporate other modern components into your desktop application.
33
title: Modernize your desktop apps for Windows
44
ms.topic: article
5-
ms.date: 01/28/2026
5+
ms.date: 02/27/2026
66
ms.localizationpriority: medium
77
---
88

@@ -61,39 +61,16 @@ For more information, see [Use MSIX framework packages dynamically from your des
6161

6262
For more information, see [What's new in .NET 10](/dotnet/core/whats-new/dotnet-10/overview).
6363

64-
## Host WinRT XAML controls (XAML Islands)
64+
## Host WinUI XAML controls (XAML Islands)
6565

66-
Starting with Windows 10, version 1903, you can add [UWP XAML controls](/windows/uwp/design/controls-and-patterns/controls-by-function) directly to any UI element in a WPF, Windows Forms, or C++ desktop app that is associated with a window handle (HWND). This means that you can fully integrate the latest UWP features such as [Windows Ink](/windows/uwp/design/input/pen-and-stylus-interactions) and controls that support the [Fluent Design System](/windows/uwp/design/fluent-design-system/index) into windows and other display surfaces in your desktop apps. This developer scenario is sometimes called *XAML islands*.
67-
68-
For more information, see [WinRT XAML controls in desktop apps](xaml-islands/xaml-islands.md)
69-
70-
## Use the Visual layer in desktop apps
71-
72-
You can now use Windows Runtime APIs in non-UWP desktop apps to enhance the look, feel, and functionality of your WPF, Windows Forms, and C++ desktop apps, and take advantage of the latest Windows UI features that are only available via UWP. This is useful when you need to create custom experiences that go beyond the built-in WinRT XAML controls you can host by using XAML Islands.
66+
You can add [WinUI XAML controls](/windows/uwp/design/controls-and-patterns/controls-by-function) directly to any UI element in a WPF, Windows Forms, or C++ desktop app that is associated with a window handle (HWND). This means that you can fully integrate the latest WinUI features and controls that support the [Fluent Design System](../../design/index.md) into windows and other display surfaces in your desktop apps. This developer scenario is sometimes called *XAML islands*.
7367

7468
For more information, see [Modernize your desktop app using the Visual layer](ui/visual-layer-in-desktop-apps.md).
7569

7670
## Additional features available to apps with package identity
7771

7872
Some modern Windows experiences are available only to desktop apps that have [package identity](/uwp/schemas/appxpackage/uapmanifestschema/element-identity) at runtime. These features include certain Windows Runtime APIs, package extensions, and UWP components. For more info, see [Features that require package identity](modernize-packaged-apps.md).
7973

80-
<a id="desktop-uwp-controls"></a>
81-
82-
## WinRT XAML controls optimized for desktop apps
83-
84-
Whether you're building a UWP app that exclusively targets the desktop device family or you want to use WinRT XAML controls in a WPF, Windows Forms, or C++ desktop app, the following new and updated WinRT XAML controls are designed to offer desktop-optimized experiences with the [Fluent Design System](/windows/uwp/design/fluent-design-system/index). These controls were introduced in Windows 10, version 1809 (the October 2018 Update, or version 10.0.17763).
85-
86-
| Control | Description |
87-
|------ |--------------|
88-
| [MenuBar](/windows/uwp/design/controls-and-patterns/menus#create-a-menu-bar) | Provides a quick and simple way to expose a set of commands for apps that might need more organization or grouping than a **CommandBar** allows. |
89-
| [DropDownButton](/windows/uwp/design/controls-and-patterns/buttons#create-a-drop-down-button) | Shows a chevron as a visual indicator that it has an attached flyout that contains more options. |
90-
| [SplitButton](/windows/uwp/design/controls-and-patterns/buttons#create-a-split-button) | Provides a button has two parts that can be invoked separately. One part behaves like a standard button and invokes an immediate action. The other part invokes a flyout that contains additional options that the user can choose from.|
91-
| [ToggleSplitButton](/windows/uwp/design/controls-and-patterns/buttons#create-a-toggle-split-button) | Provides a button has two parts that can be invoked separately. One part behaves like a toggle button that can be on or off. The other part invokes a flyout that contains additional options that the user can choose from. |
92-
| [CommandBarFlyout](/windows/uwp/design/controls-and-patterns/command-bar-flyout) | Lets you show common user tasks in the context of an item on your UI canvas. |
93-
| [ComboBox](/windows/uwp/design/controls-and-patterns/combo-box#make-a-combo-box-editable) | You can now make a combo box editable so the user can enter values that aren't listed in the control. |
94-
| [TreeView](/windows/uwp/design/controls-and-patterns/tree-view) | You can now configure a tree view to enable data binding, item templates, and drag and drop. |
95-
| [DataGridView](/windows/communitytoolkit/controls/datagrid) | Provides a flexible way to display a collection of data in rows and columns. This control is available in the [Windows Community Toolkit](/windows/uwpcommunitytoolkit/). |
96-
9774
## Other technologies for modern desktop apps
9875

9976
### Microsoft Graph

uwp/develop/toc.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,3 +1296,23 @@ items:
12961296
href: ../ui-input/app-window.md
12971297
- name: Use ApplicationView
12981298
href: ../ui-input/application-view.md
1299+
- name: Host XAML controls (XAML Islands)
1300+
items:
1301+
- name: Overview
1302+
href: ../xaml-islands/xaml-islands.md
1303+
- name: XAML Islands in WPF and Windows Forms apps
1304+
items:
1305+
- name: Use XAML Islands to host a UWP XAML control in a C# WPF app
1306+
href: ../xaml-islands/host-standard-control-with-xaml-islands.md
1307+
- name: Host a custom XAML control
1308+
href: ../xaml-islands/host-custom-control-with-xaml-islands.md
1309+
- name: XAML Islands in C++ desktop apps
1310+
items:
1311+
- name: Using the XAML hosting API
1312+
href: ../xaml-islands/using-the-xaml-hosting-api.md
1313+
- name: Host a standard XAML control
1314+
href: ../xaml-islands/host-standard-control-with-xaml-islands-cpp.md
1315+
- name: Host a custom XAML control
1316+
href: ../xaml-islands/host-custom-control-with-xaml-islands-cpp.md
1317+
- name: Advanced scenarios
1318+
href: ../xaml-islands/advanced-scenarios-xaml-islands-cpp.md

uwp/docfx.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"exclude": ["**/obj/**"]
1414
} ],
1515
"globalMetadata": {
16-
"ms.subservice": "uwp-conceptual-docs",
1716
"ms.service": "uwp",
1817
"recommendations": true,
1918
"ROBOTS": "INDEX, FOLLOW",

hub/apps/desktop/modernize/xaml-islands/advanced-scenarios-xaml-islands-cpp.md renamed to uwp/xaml-islands/advanced-scenarios-xaml-islands-cpp.md

File renamed without changes.

hub/apps/desktop/modernize/xaml-islands/host-custom-control-with-xaml-islands-cpp.md renamed to uwp/xaml-islands/host-custom-control-with-xaml-islands-cpp.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ Next, add a **UWP (C++/WinRT)** app project to your solution and make some confi
6767

6868
4. Right-click the **MyUWPApp** node and select **Properties**. On the **Common Properties** -> **C++/WinRT** page, set the **Verbosity** property to **normal** and then click **Apply**. When you are done, the properties page should look like this.
6969

70-
![Screenshot of the project Property page with Common Properties - C++/WinRT selected, the Verbosity property highlighted, and it's value set to 'normal'.](../images/xaml-islands/xaml-island-cpp-1.png)
70+
![Screenshot of the project Property page with Common Properties - C++/WinRT selected, the Verbosity property highlighted, and it's value set to 'normal'.](images/xaml-island-cpp-1.png)
7171

7272
5. On the **Configuration Properties** -> **General** page of the properties window, set **Configuration Type** to **Dynamic Library (.dll)**, and then click **OK** to close the properties window.
7373

74-
![Screenshot of the project Property page with Configuration Properties - General selected, the Configuration Type property highlighted and it's value set to 'Dynamic Library (.dll)'.](../images/xaml-islands/xaml-island-cpp-2.png)
74+
![Screenshot of the project Property page with Configuration Properties - General selected, the Configuration Type property highlighted and it's value set to 'Dynamic Library (.dll)'.](images/xaml-island-cpp-2.png)
7575

7676
6. Add a placeholder executable file to the **MyUWPApp** project. This placeholder executable file is required for Visual Studio to generate the required project files and properly build the project.
7777

7878
1. In **Solution Explorer**, right-click the **MyUWPApp** project node and select **Add** -> **New Item**.
7979
2. In the **Add New Item** dialog, select **Utility** in the left page, and then select **Text File (.txt)**. Enter the name **placeholder.exe** and click **Add**.
80-
![Screenshot of the Add New Item dialog with Visual C++ - Utility selected, Text File highlighted, and 'placeholder.exe' entered as the file name.](../images/xaml-islands/xaml-island-cpp-3.png)
80+
![Screenshot of the Add New Item dialog with Visual C++ - Utility selected, Text File highlighted, and 'placeholder.exe' entered as the file name.](images/xaml-island-cpp-3.png)
8181
3. In **Solution Explorer**, select the **placeholder.exe** file. In the **Properties** window, make sure the **Content** property is set to **True**.
8282
4. In **Solution Explorer**, right-click the **Package.appxmanifest** file in the **MyUWPApp** project, select **Open With**, and select **XML (Text) Editor**, and click **OK**.
8383
5. Find the **&lt;Application&gt;** element and change the **Executable** attribute to the value `placeholder.exe`. When you are done, the **&lt;Application&gt;** element should look similar to this.
@@ -135,10 +135,10 @@ In this section, you'll update the solution that contains both projects to confi
135135
5. Repeat the previous step to add the **Solution.props** file to the **MyUWPApp** project in the **Property Manager** window.
136136
6. Close the **Property Manager** window.
137137
7. Confirm that the property sheet changes were saved properly. In **Solution Explorer**, right-click the **MyDesktopWin32App** project and choose **Properties**. Click **Configuration Properties** -> **General**, and confirm that the **Output Directory** and **Intermediate Directory** properties have the values you added to the **Solution.props** file. You can also confirm the same for the **MyUWPApp** project.
138-
![Screenshot of the Project Property page with Configuration Properties - General selected and the General Properties displayed.](../images/xaml-islands/xaml-island-cpp-4.png)
138+
![Screenshot of the Project Property page with Configuration Properties - General selected and the General Properties displayed.](images/xaml-island-cpp-4.png)
139139

140140
8. In **Solution Explorer**, right-click the solution node and choose **Project Dependencies**. In the **Projects** drop-down, make sure that **MyDesktopWin32App** is selected, and select **MyUWPApp** in the **Depends On** list.
141-
![Screenshot of the Project Dependencies dialog with the current project selected from the Projects drop-down and the MyUWPApp dependency checked in the 'Depends on:' panel.](../images/xaml-islands/xaml-island-cpp-5.png)
141+
![Screenshot of the Project Dependencies dialog with the current project selected from the Projects drop-down and the MyUWPApp dependency checked in the 'Depends on:' panel.](images/xaml-island-cpp-5.png)
142142

143143
9. Click **OK**.
144144

@@ -306,7 +306,7 @@ You can package the app in an [MSIX package](/windows/msix) for deployment. MSIX
306306
1. Add a new [Windows Application Packaging Project](/windows/msix/desktop/desktop-to-uwp-packaging-dot-net) to your solution. As you create the project, name it **MyDesktopWin32Project** and select **Windows 10, version 1903 (10.0; Build 18362)** for both the **Target version** and **Minimum version**.
307307

308308
2. In the packaging project, right-click the **Applications** node and choose **Add reference**. In the list of projects, select the check box next to the **MyDesktopWin32App** project and click **OK**.
309-
![Screenshot of the Reference Manager dialog for the packaging project with the current project selected as a reference.](../images/xaml-islands/xaml-island-cpp-6.png)
309+
![Screenshot of the Reference Manager dialog for the packaging project with the current project selected as a reference.](images/xaml-island-cpp-6.png)
310310

311311
3. For info about distributing/deploying the package, see [Manage your MSIX deployment](/windows/msix/desktop/managing-your-msix-deployment-overview).
312312

@@ -373,7 +373,7 @@ Next, update the **MyDesktopWin32App** project to define a macro for additional
373373

374374
5. Right-click the **MyDesktopWin32App** project, select **Properties**, and expand **Manifest Tool** -> **Input and Output** in the left pane. Set the **DPI Awareness** property to **Per Monitor High DPI Aware**. If you do not set this property, you may encounter a manifest configuration error in certain high DPI scenarios.
375375

376-
![Screenshot of the Property page for the current project with Configuration Properties - Manifest Tool - Input and Output selected and DPI Awareness set to 'Per Monitor High DPI Aware'.](../images/xaml-islands/xaml-island-cpp-8.png)
376+
![Screenshot of the Property page for the current project with Configuration Properties - Manifest Tool - Input and Output selected and DPI Awareness set to 'Per Monitor High DPI Aware'.](images/xaml-island-cpp-8.png)
377377

378378
6. Click **OK** to close the **Property Pages** dialog.
379379

@@ -579,7 +579,7 @@ This section demonstrates how to add a WinRT XAML control from the WinUI for UWP
579579

580580
Run the solution and confirm that **MyDesktopWin32App** opens with the following window.
581581

582-
![Screenshot of the MyDesktopWin32App app demonstrated in this topic.](../images/xaml-islands/xaml-island-cpp-9.png)
582+
![Screenshot of the MyDesktopWin32App app demonstrated in this topic.](images/xaml-island-cpp-9.png)
583583

584584
## Next steps
585585

hub/apps/desktop/modernize/xaml-islands/host-custom-control-with-xaml-islands.md renamed to uwp/xaml-islands/host-custom-control-with-xaml-islands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ The following instructions show you how to package the all the components in the
340340

341341
If you're hosting a custom control that contains a control from the WinUI library, you may encounter a problem where the control cannot be loaded in a packaged app and debugging the code shows the following error.
342342

343-
![Failed to host WinUI library control](../images/xaml-islands/host-custom-control-error.png)
343+
![Failed to host WinUI library control](images/host-custom-control-error.png)
344344

345345
To resolve this error, copy the **App.xbf** file from the build output folder of the WPF project to the **\AppX\\<WPF project\>** build output folder of the packaging project.
346346

hub/apps/desktop/modernize/xaml-islands/host-standard-control-with-xaml-islands-cpp.md renamed to uwp/xaml-islands/host-standard-control-with-xaml-islands-cpp.md

File renamed without changes.

hub/apps/desktop/modernize/xaml-islands/host-standard-control-with-xaml-islands.md renamed to uwp/xaml-islands/host-standard-control-with-xaml-islands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,4 @@ The following instructions show you how to package all the components in the sol
320320
* [IXamlMetadataProvider interface](/uwp/api/Windows.UI.Xaml.Markup.IXamlMetadataProvider)
321321
* [MSIX documentation](/windows/msix)
322322
* [Set up your desktop application for MSIX packaging in Visual Studio](/windows/msix/desktop/desktop-to-uwp-packaging-dot-net)
323-
* [Microsoft Visual C++ Redistributable latest supported downloads](https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads)
323+
* [Microsoft Visual C++ Redistributable latest supported downloads](/cpp/windows/latest-supported-vc-redist)

hub/apps/desktop/modernize/images/xaml-islands/host-controls.png renamed to uwp/xaml-islands/images/host-controls.png

File renamed without changes.

0 commit comments

Comments
 (0)