maui icon indicating copy to clipboard operation
maui copied to clipboard

StackLayout IsEnabled Property does not work

Open cbradbaer opened this issue 2 years ago • 9 comments

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

  1. Create a new blank .NET Maui app (Xaml/C#)
  2. In Xaml, add Button and two Entry views to the main StackLayout
  3. Set the isEnabled property of the StackLayout to false
  4. Run the program on any platform
  5. 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

cbradbaer avatar Mar 14 '22 18:03 cbradbaer

Verified Repro with Android 11. Repro Project is available: #5287.zip

PineYi avatar Mar 15 '22 02:03 PineYi

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

cbaer-extron avatar Apr 19 '22 16:04 cbaer-extron

repro on windows with 17.3.0 Preview 2.0 [32506.368.main]. <StackLayout IsEnabled="False" > does not work. repro project: MauiApp2.zip

kristinx0211 avatar May 07 '22 05:05 kristinx0211

Still an issue on 6.0.300-rc.4.5772

samhouts avatar May 12 '22 02:05 samhouts

Still an Issue on Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.3.0 Preview 2.0

GDT48 avatar Jul 07 '22 10:07 GDT48

This is a rather annoying and serious bug ... When will we have a fix?

justcivah avatar Nov 04 '22 17:11 justcivah

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.

cbaer-extron avatar Nov 04 '22 17:11 cbaer-extron

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

XamerDev avatar Nov 25 '22 13:11 XamerDev

@justcivah You're right! This is so frustating for us...

dnovaprove avatar Dec 27 '22 16:12 dnovaprove

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.

ghost avatar Jan 18 '23 04:01 ghost

This is a serious issue and workaround it is definitely not efficient nor clean. Would appreciate a fix soon. Thanks!

imanGDZ avatar Feb 02 '23 01:02 imanGDZ

This has been fixed in https://github.com/dotnet/maui/pull/12488

mattleibow avatar Feb 02 '23 08:02 mattleibow

This has been fixed in #12488

@mattleibow when will the next update be available?

acaliaro avatar Feb 02 '23 11:02 acaliaro

@mattleibow when will the next update be available?

hosamyousof avatar Feb 20 '23 10:02 hosamyousof