Open tom-huntington opened 3 hours ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!
FindName()
does not work when root object is a Window (#9842), similarity score: 0.85Note: You can give me feedback by thumbs upping or thumbs downing this comment.
https://learn.microsoft.com/en-us/windows/uwp/xaml-platform/x-load-attribute
when the element is not loaded, its memory is released and internally a small placeholder is used to mark its place in the visual tree.
So I'm guessing this placeholder is being removed. When I iterate over Panel.Children
the placeholders are not there. But calling UIElementCollection.ReplaceAll
removes them, as per my other issue
Describe the bug
This doesn't happen in C#
This also happens if we replace the call to
UnloadObject
withmyStackPanel.Children().ReplaceAll({});
. This is similar to https://github.com/microsoft/microsoft-ui-xaml/issues/10176Steps to reproduce the bug
NuGet package version
WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003
Windows version
Windows 11 (21H2): Build 22000
Additional context
No response