Closed
Copy link
Labels
area/xaml-readerCategorizes an issue or PR as relevant to the XAML Readerdifficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/bugSomething isn't working
Description
Current behavior
uno/src/Uno.UI/UI/Xaml/Markup/Reader/XamlObjectBuilder.cs
Lines 123 to 140 in d67dab2
| if (type.Is<FrameworkTemplate>()) | |
| { | |
| Func<_View?> builder = () => | |
| { | |
| var contentOwner = unknownContent; | |
| return LoadObject(contentOwner?.Objects.FirstOrDefault(), rootInstance: rootInstance) as _View; | |
| }; | |
| var created = Activator.CreateInstance(type, builder); | |
| if (created is FrameworkElement fe && _fileUri is not null) | |
| { | |
| fe.SetBaseUri(fe.BaseUri.OriginalString, _fileUri, control.LineNumber, control.LinePosition); | |
| } | |
| return created; | |
| } |
This doesn't handle FrameworkTemplates properly
Expected behavior
No response
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
No response
Works on UWP/WinUI
None
Environment
No response
NuGet package version(s)
No response
Affected platforms
No response
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response
Metadata
Metadata
Assignees
Labels
area/xaml-readerCategorizes an issue or PR as relevant to the XAML Readerdifficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/bugSomething isn't working
Activity
github-actions commentedon May 5, 2026
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
fix(xaml-reader): set properties on FrameworkTemplate