Skip to content

Commit

Permalink
Revert "[C] Prevent enabling a Button via setting a Command (#308)"
Browse files Browse the repository at this point in the history
This reverts commit 368a375.
  • Loading branch information
rmarinho committed Sep 13, 2016
1 parent 506a787 commit c92f079
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 58 deletions.

This file was deleted.

Expand Up @@ -124,7 +124,6 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla42364.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla42519.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla43516.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla43354.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CarouselAsync.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla34561.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla34727.cs" />
Expand Down
4 changes: 3 additions & 1 deletion Xamarin.Forms.Core/Button.cs
Expand Up @@ -180,7 +180,7 @@ protected override void OnPropertyChanging(string propertyName = null)
void CommandCanExecuteChanged(object sender, EventArgs eventArgs)
{
ICommand cmd = Command;
if (cmd != null && IsEnabled)
if (cmd != null)
IsEnabledCore = cmd.CanExecute(CommandParameter);
}

Expand Down Expand Up @@ -225,6 +225,8 @@ void OnCommandChanged()
Command.CanExecuteChanged += CommandCanExecuteChanged;
CommandCanExecuteChanged(this, EventArgs.Empty);
}
else
IsEnabledCore = true;
}

void OnSourceChanged(object sender, EventArgs eventArgs)
Expand Down

0 comments on commit c92f079

Please sign in to comment.