You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: syntax highlighting for .xaml files (WPF/MAUI) #16396
XAML files (WPF, .NET MAUI, WinUI) render as plain text in Orca's editor — no syntax highlighting at all. detectLanguage() in src/renderer/src/lib/language-detect.ts has no .xaml entry, so XAML files fall through to 'plaintext'.
XAML is XML, and Monaco ships a solid built-in xml language (tags, attribute names/values, comments, CDATA) that would already make XAML files readable — the same approach Orca already uses for .jsp/.jspf → html.
Proposed solution
Add .xaml: 'xml' to EXT_TO_LANGUAGE in src/renderer/src/lib/language-detect.ts, plus a test entry — mirroring the existing .jsp → html mapping (#12402).
This immediately colors tags, attribute names, values and comments. Known limitation: markup extensions such as {Binding Path=...}, {StaticResource ...} or x:TypeArguments stay single-colored inside attribute values.
Longer term, a dedicated XAML language registration (Monarch tokenizer like register-vue.ts, or a TextMate grammar like the bundled Nim grammar) could also highlight {Binding ...} markup extensions, x: directives and attached properties — but the one-line mapping above would already be a large quality-of-life win for .NET developers.
Alternatives or additional context
Affected users: anyone editing WPF / .NET MAUI / WinUI XAML in Orca. .cs is already mapped; XAML is the missing half of the C# workflow.
No in-app workaround exists today; users must switch to VS Code/Rider for XAML.
Monaco's xml language needs no worker, so there is no runtime cost to the mapping.
Resolved by merged #23371: .xaml files now use Monaco's built-in XML highlighting, including uppercase extensions and Windows paths.
Thanks @smaucy for the detailed report and @psh4607 for the focused implementation and regression cases in #16530. Both are credited in #23371, and I verified the normal and uppercase Windows cases before closing. The fix will be available in a release containing #23371; it does not add special tokenization inside {Binding ...} or other markup-extension attribute values.
Activity
nwparker commentedon Sep 27, 2026
Resolved by merged #23371:
.xamlfiles now use Monaco's built-in XML highlighting, including uppercase extensions and Windows paths.Thanks @smaucy for the detailed report and @psh4607 for the focused implementation and regression cases in #16530. Both are credited in #23371, and I verified the normal and uppercase Windows cases before closing. The fix will be available in a release containing #23371; it does not add special tokenization inside
{Binding ...}or other markup-extension attribute values.