Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackLayout.IsEnabled = FALSE does not Disable the Child Components within it #6008

Closed
cbaer-extron opened this issue Apr 12, 2022 · 3 comments
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@cbaer-extron
Copy link

Description

In Maui App, if a StackLayout is disabled with IsEnabled = FALSE, all the child controls within it, should be disabled also. But Maui ignores StackLayout.IsEnabaled = FALSE, and all child controls are still enabled. In comparison, Xamarin.Forms will disable all child controls. (See both attached videos)
In Maui:

IsEnabledTestMaui.mp4

In Xamarin.Forms:

IsEnabledTestXF.mp4

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

Steps to Reproduce

  1. Create new Maui App
  2. Add a StackLayout and set IsEnabled = FALSE in the Xaml
  3. Add Entry View and Button to the StackLayout
  4. Run the program
  5. Note that the Entry can still get focus and text can be entered
  6. Note that the Button can still be pressed

Version with bug

Preview 14 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 11

Did you find any workaround?

I used Triggers to individually set IsEnabled to false on all the child controls. Ugly, but it worked.

Relevant log output

No response

@cbaer-extron cbaer-extron added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Apr 12, 2022
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Apr 13, 2022
@XamlTest
Copy link

Verified this issue with Visual Studio Enterprise 17.3.0 Preview 1.0 [32409.46.main]. Repro on Android. Sample Project: MauiApp13.zip

@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Apr 13, 2022
@mfe-
Copy link

mfe- commented Apr 19, 2022

Occurs also on the Windows platform for me.

@hartez
Copy link
Contributor

hartez commented Apr 19, 2022

Duplicate of #5287

@hartez hartez marked this as a duplicate of #5287 Apr 19, 2022
@hartez hartez closed this as completed Apr 19, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants