microsoft / microsoft/microsoft-ui-xaml

Remove redundant `controls:` and `muxc:` prefixes from built-in control styles

Open
#11,210 2 comments 4 reactions 1 assignee Claimed by @niels9001 View on GitHub
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

## Problem

The built-in WinUI control styles (templates and theme resources) still use `controls:` and `muxc:` namespace prefixes that date back to WinUI 2, where these were needed to distinguish WinUI controls from the built-in WUX controls. In WinUI 3, `Microsoft.UI.Xaml.Controls` is the default XAML namespace, so these prefixes are completely redundant.

This causes friction for developers: when copying a built-in style to create a custom version (e.g. from Generic.xaml or theme resources), the `controls:` prefixed elements fail to resolve unless the developer manually adds the `xmlns:controls="using:Microsoft.UI.Xaml.Controls"` declaration or removes all the prefixes by hand. Since the prefix is redundant, it's just unnecessary work.

## Proposal

Remove all `controls:` and `muxc:` prefixes (and their corresponding xmlns declarations) from the built-in control XAML files where they map to `using:Microsoft.UI.Xaml.Controls`.

This is a no-op functionally — the types resolve the same way without the prefix — but it makes the styles cleaner and copy-paste friendly.

## Related

- #10991 — Default control styles not found if `TargetType` contains a `controls:` prefix in `Generic.xaml`
- #8504 — WinUI 3 cannot resolve `DefaultTeachingTipStyle` for a custom `BasedOn` style

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.