Closed etvorun closed 1 year ago
can't you use RegisterName()
can't you use RegisterName()
We use, but it does not always work, e.g. see XET bug 1267625.
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
I just debugged this, and it seems like we (UITools MAUI TAP) aren't sending the TAP message UpdateNameRegistration when the x:Name is added or changed. When I forced a call to UpdateNameRegistration, then the new x:Name did show up in the Live Visual Tree.
So this could end up being a fix in MAUI TAP (UITools repo). I'll take this to debug more.
@etvorun the fix went into UITools Xamarin hot reload code, not MAUI repo:
Consider following XAML
If user uncomments ItemsPageDetails item we need to create new FlyoutItem, add it to Shell and register ItemsPageDetails with appropriate namescope. VS Hot Reload attemps to find namescope by traversing ItemsPageDetails ancestors. However we currently fail to find namescope. The net result is new FlyoutItem appears in Live Visual Tree without a name. For more details see VS bug 1267625. One thing to note about names is that users will name elements not for the sake of referencing them via bindings and alike but just to be able to easily find right items in Live Visual Tree. Thus we would like to see following improvements: