Ambiguity Between IView.Arrange() and VisualElement.Arrange() #17417
Labels
area-layout
StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
fixed-in-9.0.0-preview.7.24407.4
t/bug
Something isn't working
Milestone
Description
This is super low priority, just a "gotcha" I ran into that I thought was worth mentioning.
When implementing a custom LayoutManager and invoking the Arrange method during the ArrangeOverride phase, there's a potential ambiguity between two methods:
Seemingly, only the
IView.Arrange()
method works correctly within the context of aLayoutManager
.For example, this doesn't work:
But this does:
It took me a decent time debugging to figure out why none of my items were getting arranged on the screen, so at a worst case hopefully this can help some people out. Even if there isn't a fix it might be useful to call this out when the custom layout manager documentation is released.
If I'm misunderstanding something, please let me know, I'm still learning 😄.
Steps to Reproduce
.Arrange()
on aVisualElement
without hard-casting to IViewLink to public reproduction project repository
No response
Version with bug
8.0.0-preview.7.8842
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
I was not able test on other platforms
Affected platform versions
Not really relevant
Did you find any workaround?
Yes, hard cast to IView
Relevant log output
No response
The text was updated successfully, but these errors were encountered: