-
Notifications
You must be signed in to change notification settings - Fork 834
fix: Support custom markup extensions in XamlReader.Load #22073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: nickrandolph <[email protected]>
|
|
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22073/docs/index.html |
Co-authored-by: nickrandolph <[email protected]>
Co-authored-by: nickrandolph <[email protected]>
Co-authored-by: nickrandolph <[email protected]>
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22073/docs/index.html |
|
|
|
@copilot fix test error: Error message View Copy |
Co-authored-by: nickrandolph <[email protected]>
Fixed in commit e775744. The issue was that collection properties like |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22073/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22073/docs/index.html |
Summary
Fixed an issue where
XamlReader.Loadwould throwNotSupportedExceptionwhen encountering custom markup extensions (e.g.,{utu:Responsive Narrow=1, Wide=2}).Changes
IsMarkupExtensionto detect any type inheriting fromMarkupExtensionusing newIsCustomMarkupExtensionhelperProcessCustomMarkupExtensionto handle custom markup extension evaluation with proper error handling and collection property supportLatest Fix
Fixed test failure in
When_MarkupExtension_ServiceProvider_InlineLiteralby adding support for collection properties (likePanel.Children). The method now:TypeResolver.IsInitializedCollectionAddmethodCloses https://github.com/unoplatform/uno/issues/XXXXX
Original prompt
This section details on the original issue you should resolve
<issue_title>XamlReader.Load exception - unable to parse markup extension</issue_title>
<issue_description>### Current behavior 🐛
Attempting to call XamlReader.Load on XAML that contains uses a custom markup extension fail to parse
Sample App
ParsingSample.zip
Expected behavior 🎯
No parsing errors - markup extension should be correctly parsed and loaded
How to reproduce it (as minimally and precisely as possible) 🔬
No response
Workaround 🛠️
No response
Renderer 🎨
Affected platforms 📱💻🖥️
No response
Uno.Sdk version (and other relevant versions) 📦
Uno.Sdk 6.4.40
IDE version 🧑💻
Visual Studio 2026 18.0.2
Anything else we need to know? 💬
Call Stack: