英文:
Create select dropwdown picker to filter values in xamarin
问题
我希望用户从列表中选择他们的症状。这将是一个非常长的列表,所以我希望能够进行筛选,同时也要有适当的下拉选择项。类似于这样的东西:
有Xamarin.Forms Picker(https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/picker/),但它只能显示一个列表以供选择,对吗?没有输入的可能性。
如何在Xamarin Forms中实现类似图片的东西?
英文:
I want user to select their symptoms from a list. It is gonna be a very long list so I would like to filter it but at the same time have proper dropdown select item. Something like this:
There is Xamarin.Forms Picker (https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/picker/) but it can only display itewms in a list to select, right? No possibility to input.
How can I achieve something similar like picture in Xamarin Forms?
答案1
得分: 1
您可以使用搜索栏或Xamarin.Forms Shell搜索来实现您想要的元素。
<SearchBar Placeholder="搜索项目..."
CancelButtonColor="橙色"
PlaceholderColor="橙色"
TextColor="橙色"
TextTransform="小写"
HorizontalTextAlignment="居中"
FontSize="中号"
FontAttributes="斜体" />
更多信息,您可以参考Xamarin.Forms SearchBar。
英文:
You can use the searchbar or the Xamarin.Forms Shell search to realize the element you want.
<SearchBar Placeholder="Search items..."
CancelButtonColor="Orange"
PlaceholderColor="Orange"
TextColor="Orange"
TextTransform="Lowercase"
HorizontalTextAlignment="Center"
FontSize="Medium"
FontAttributes="Italic" />
More information you can refer to Xamarin.Forms SearchBar.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论