Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Cannot assign property "SearchCommand": type mismatch

$
0
0

I have a very simple app using XAML. It was working fine, then I get the following error when running the project:

Cannot assign property "SearchCommand": type mismatch between "System.String" and "System.Windows.Input.ICommand"

Here is the XAML:
<?xml version="1.0" encoding="utf-8" ?>

<SearchBar x:Name="searchBar" 
           Placeholder="Enter search terms"
           HorizontalOptions="FillAndExpand"
           SearchCommand="OnSearchButtonClicked">
</SearchBar>

<ScrollView VerticalOptions="FillAndExpand">
  <StackLayout x:Name="resultsLayout">
  </StackLayout>
</ScrollView>

I'm confused as it was working fine earlier.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>