From 3ad9c6b7bb48553972b059df4627526524005a07 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Jul 2026 19:53:35 +0000 Subject: [PATCH 1/2] Initial plan From 00889e70f4a218915e9f1f5d4723cf3af9714c76 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Jul 2026 19:56:55 +0000 Subject: [PATCH 2/2] Fix incorrect BasedOn guidance for WinUI 3 controls in xaml-styles.md --- hub/apps/develop/platform/xaml/xaml-styles.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hub/apps/develop/platform/xaml/xaml-styles.md b/hub/apps/develop/platform/xaml/xaml-styles.md index 71f581ab91..e6718fda5d 100644 --- a/hub/apps/develop/platform/xaml/xaml-styles.md +++ b/hub/apps/develop/platform/xaml/xaml-styles.md @@ -3,7 +3,7 @@ description: Styles let you set control properties and reuse those settings for MS-HAID: dev\_ctrl\_layout\_txt.styling\_controls MSHAttr: PreferredLib:/library/windows/apps Search.Product: eADQiWindows 10XVcnh -ms.date: 01/03/2019 +ms.date: 07/30/2026 title: XAML styles ms.assetid: AB469A46-FAF5-42D0-9340-948D0EDF4150 label: XAML styles @@ -244,16 +244,14 @@ Its required that you use a `ThemeDictionary` that is duplicated three times in The best way to stay current with our latest visual styles is to avoid custom styles and templates (also known as re-templating). Styles are still a convenient way to apply a set of values consistently across controls in your app. When doing this, make sure to be based on our latest styles. -For system controls that use WinUI styles (`Windows.UI.Xaml.Controls` namespace), set `BasedOn="{StaticResource DefaultStyle}"`, where `` is the name of the control. For example: +For WinUI 3 controls in the `Microsoft.UI.Xaml.Controls` namespace, always set `BasedOn="{StaticResource DefaultStyle}"`, where `` is the name of the control. This ensures your style inherits the current WinUI 3 visual defaults—such as rounded corners and proper theming—and only overrides the specific properties you set. Omitting `BasedOn` replaces the default style entirely, which can cause controls to lose their expected WinUI 3 appearance. For example: ```xaml - ``` -For WinUI controls (`Microsoft.UI.Xaml.Controls` namespace), the default style is defined in the metadata, so omit `BasedOn`. - ### Derived controls If you derive a custom control from an existing XAML control, it might not always get the WinUI styles by default. To apply the WinUI styles: