maui
maui copied to clipboard
Changing visibility in child elements does not work
Description
Hi,
currently our MAUI-team is facing a new issue. It´s a little bit complicated to explain, so read carefully. We got an FooterView with an indexBar (this indexBar represents a list of questions. So every question got an own button to jump to the exact question). This indexBar can be expanded and collapsed - or in other words shown and hidden. To achieve this, we set the visibility to "True" or "False". One feature of our app is to mark questions. If a question gets marked, the button in the indexBar connected with the current question, should show an yellow circle. Now comes the part where the error occurs. If the indexBar is expanded (visible), the circle does get drawn totally fine. But if i mark the question and the indexBar is currently collapsed (hidden) and i expand the indexBar, the circle is not visible.
I hope the problem is more or less understandable 😅
I believe the problem has something to do, that the visibility of elements can´t be changed, if the parent element is already hidden. But in my opinion the visibility of the child elements should be also rerendered, if the parents visibility gets set to "True".
By the way, in Xamarin this worked totally fine...
Steps to Reproduce
- Put a label into a StackLayout
- Set the visibility of both elements to False
- Change the visibility of the inner element (label) to True (via code - in our case it got set via a bindableProperty)
- Change the visibility of the outer element (StackLayout) to True (also via code)
Expected outcome: both elements should be visible Actual outcome: only the StackLayout gets visible
Link to public reproduction project repository
No response
Version with bug
8.0.90 SR9
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
No response
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response