Bug 39409

Summary: SearchBar.SearchCommand does not respect CanExecute
Product: Forms Reporter: Mark Smith <mark.smith>
Component: FormsAssignee: Bugzilla <bugzilla>
Severity: enhancement CC: david, eric.maupin, jas, parmendrak, seth.rosetter
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS   
Tags: ac Is this bug a regression?: ---
Last known good build:

Description Mark Smith 2016-03-07 13:33:54 UTC
1. Add a SearchBar to a Xamarin.Forms app
2. Bind the SearchCommand to a Command.
3. Set the Command's CanExecute to always return false.
4. Run the app and issue a search result - the Command is invoked.

Because the Command.CanExecute is returning false, the Command should not be invoked. In addition, the SearchBar should wire up to the CanExecuteChanged handler and properly enable and disable the search bar in the native platform as it changes.
Comment 1 Jason Smith [MSFT] 2016-03-11 11:21:12 UTC
Should be fixed in 2.2.0-pre1
Comment 2 Parmendra Kumar 2016-04-25 17:23:17 UTC
I have checked this issue with X.F 2.2.0-pre4 and its working fine. To reproduce and verify this issue I have used sample project.

SampleCode: https://gist.github.com/Parmendrak/4c9cf8883b447e7d6c8566a13f093398

Hence closing this issue.