xamarin/Xamarin.Forms
The order of 'IsEnabled' and 'Command' should not matter
Ouverte
#2 758 ouverte le 17 mai 2018
breakinge/5 :clock5:help wantedm/high impact :black_large_square:p/0t/bug :bug:up-for-grabs
Métriques du dépôt
- Stars
- (5 644 étoiles)
- Métriques de merge PR
- (Métriques PR en attente)
Description
Description
I have two buttons:
<Button
Text="Button1"
Command="{Binding TheCommand}"
IsEnabled="False" />
<Button
Text="Button2"
IsEnabled="False"
Command="{Binding TheCommand}" />
For some reason, the IsEnabled property is overwritten in Button2 - this enables the button incorrectly.
Button1 is disabled this way, but when I trigger TheCommand.ChangeCanExecute(), the button enables.
Expected Behavior
Both buttons stay disabled.
The matrix of this should be an && operation:
| TheCommand.CanExecute() | IsEnabled | Final State |
|---|---|---|
| True | True | Enabled |
| True | False | Disabled |
| False | True | Disabled |
| False | False | Disabled |
Actual Behavior
The button with the command applied later overwrites the enabled state.
Basic Information
- Version with issue: 2.5.x and 3.0
- Last known good version: unsure
- IDE: VS2017
- Platform Target Frameworks: all