Elements in same layout doesn't response IsVisible changes [iOS][Mac]
See original GitHub issueDescription
When an element’s IsVisible property is changed, other elements’ position doesn’t change, they stay in the same position.
Let me explain with following gifs. When I try the same scenario in Windows or Android, everything works great. But it doesn’t work as expected on iOS and MacOS.
✅ Works fine:
Windows | Android |
❌ Doesn’t work as expected:
iOS | MacOS |
Steps to Reproduce
- Create a new project.
- Add 2 elements in the same stacklayout and set a name for the first one.
- Add a button to the page and set the first element’s
IsVisible
asfalse
. - You’ll see, the second element won’t go up and stay at the same position.
You can try the opposite, initialize the first element with IsVisible as false and set IsVisible as true via button. You’ll see the second element will be rendered on the first element.
Also, I have a repository for my complex situation, you can clone and run SandboxTreeView
project to reproduce the issue.
https://github.com/enisn/TreeView.Maui
Version with bug
6.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
iOS 15.4
Did you find any workaround?
Unfortunetely.
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Can't seem to make auto layout work right
So I have a Split View controller for my app. The Master View Controller does not want to layout correctly in different sizes,...
Read more >Layout | Apple Developer Documentation
Design a consistent layout that adapts gracefully to context changes, while displaying the same content as much as possible.
Read more >How to use Auto Layout to move other views when a ...
UIStackView repositions its views automatically when the hidden property is changed on any of its subviews (iOS 9+). UIView.
Read more >Troubleshooting Layout Issues
Are you having layout issues? These are the most common issues, causes, and solutions available. Changes Do Not Appear Online. These are issues...
Read more >macOS Ventura: 50 New Features and Changes Worth ...
Apple today released macOS Ventura, the latest version of the company's Mac operating system. macOS Ventura is a significant update that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, we are developing DevExpress .NET MAUI controls and experienced the same issue. It has a High priority for us and we do not have a workaround. Thank you for your help
@enisn No, I don’t. Temporary solution was to use another layout, I don’t consider that a workaround, result is not the same