This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 43007 - Controls nested in StackLayout need to inherit IsEnabled property
Summary: Controls nested in StackLayout need to inherit IsEnabled property
Status: RESOLVED DUPLICATE of bug 44096
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.2.0
Hardware: PC Windows
: Normal enhancement
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-02 18:38 UTC by Clint
Modified: 2017-02-23 19:03 UTC (History)
5 users (show)

See Also:
Tags: ac
Is this bug a regression?: ---
Last known good build:


Attachments

Description Clint 2016-08-02 18:38:07 UTC
Related to 42195

A nested control should not be enabled if the parent control IsEnabled=false

For example, if I have one or more controls in a StackLayout, and that StackLayout is NOT enabled then all the controls within should not receive input, should not react to taps etc.  However, that's not the case.

```xml
                        <ContentView IsEnabled="{Binding IsMultiPage, Converter={StaticResource BoolInvertConverter}}">
                            <Button BackgroundColor="{StaticResource TileScans}"
                                    Command="{Binding AcceptScanCommand}"
                                    CommandParameter="{Binding SelectedPendingImagePath}"
                                    IsEnabled="{Binding SelectedPendingImagePath,
                                                        Converter={StaticResource StringNullOrEmptyBoolConverter}}"
                                    Text="{StaticResource Accept}"
                                    TextColor="{StaticResource SecondaryTextColor}"
                                    Style="{StaticResource ButtonStyleLrg}" />
                        </ContentView>
```
In this example, if the ContentView works out to IsEnabled=false, then I should not be able to tap the button - but I can, executing the command attached to the button.

This is basic expected behavior from WPF that needs to work in the same way in Xamarin.
Comment 1 Clint 2016-11-23 15:25:38 UTC
Re-reported a month later as 44096
https://bugzilla.xamarin.com/show_bug.cgi?id=44096

Seems to be addressed in Xamarin.Forms 2.3.4pre-1 in Nov2016
Comment 2 Jimmy 2017-02-23 19:03:31 UTC

*** This bug has been marked as a duplicate of bug 44096 ***

Note You need to log in before you can comment on or make changes to this bug.