【发布时间】:2019-05-18 09:21:21
【问题描述】:
我正在使用 Xamarin.Forms 我收到错误
“System.InvalidCastException:指定的强制转换无效。”
我在 StackOverflow Xamarin.Forms Binding Specified cast is not valid 中发现了一个类似的问题
但这里回答为删除网格,但在我的情况下,我没有使用网格,为什么会出错
<StackLayout x:Name="roll" HeightRequest="0">
<SearchBar Placeholder="Type to Search" TextChanged="SearchDropDown" />
<ListView x:Name="SearchDropDownList" ItemsSource="{Binding Items}" CachingStrategy="RecycleElement" ItemSelected="OnItemSelected">
<ListView.ItemTemplate>
<DataTemplate>
<input:CheckBox Text="{Binding Text}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
我正在使用 NuGet 包管理器中的 Xamarin.Forms.InputKit 包。
我该如何解决这个问题?
【问题讨论】:
标签: xamarin xamarin.forms xamarin.android