maui
maui copied to clipboard
StackLayout IsEnabled Property does not work
Description
If a StackLayout isEnabled property is set to false. All children of the StackLayout should be disabled. This is what occurs in Xamarin.Forms. But in Maui, all children of a StackLayout remain Enabled.
Steps to Reproduce
- Create a new blank .NET Maui app (Xaml/C#)
- In Xaml, add Button and two Entry views to the main StackLayout
- Set the isEnabled property of the StackLayout to false
- Run the program on any platform
- Note that the Button and the two Entry views are still enabled and function normally
Version with bug
Preview 13 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, I was not able test on other platforms
Affected platform versions
Android 11, iOS 11, Windows 10
Did you find any workaround?
Use a DataTrigger to disable all other elements on the page. But this doesn't seem to work for CollectionView.
Relevant log output
No response
Verified Repro with Android 11. Repro Project is available: #5287.zip
Source Code: XAML: https://github.com/cbradbaer/BugReports/blob/main/StackLayoutIsEnabled/DisableTestPage.xaml
Code Behind: https://github.com/cbradbaer/BugReports/blob/main/StackLayoutIsEnabled/DisableTestPage.xaml.cs
Maui: https://user-images.githubusercontent.com/101732760/164051834-6f003a6f-bbeb-4eea-a763-9747dfa0199b.mp4
Xamarin Forms: https://user-images.githubusercontent.com/101732760/164051843-88a3de28-5352-43e3-9631-883ca15f83c6.mp4
repro on windows with 17.3.0 Preview 2.0 [32506.368.main]. <StackLayout IsEnabled="False" >
does not work. repro project:
MauiApp2.zip
Still an issue on 6.0.300-rc.4.5772
Still an Issue on Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.3.0 Preview 2.0
This is a rather annoying and serious bug ... When will we have a fix?
It's already been 8 months since I opened this issue. Still waiting. I had to work around it by using Visual State Manager on each control within the stacklayout. Really ugly.
I'm still waiting too. IsEnabled doesn't work at all
So in general if I want to create some appearing control after clicking a button and disable other controls during appearing of it, I'm still unable to do so. after 8 months I tested it on android and grid/border controls
@justcivah You're right! This is so frustating for us...
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.
This is a serious issue and workaround it is definitely not efficient nor clean. Would appreciate a fix soon. Thanks!
This has been fixed in https://github.com/dotnet/maui/pull/12488
This has been fixed in #12488
@mattleibow when will the next update be available?
@mattleibow when will the next update be available?