问题描述
我目前在便携式应用程序的可移植项目中使用Xamarin Forms DatePicker
和TimePicker
.但是,是否有一个组合控件可让您立即选择日期和时间(例如Windows窗体中的DateTimePicker)?请查看iOS设置>常规>日期和日期;时间( http://www.iphonefaq.org/images/archives/pangu-date .jpg ).
I am currently using the Xamarin Forms DatePicker
and the TimePicker
in the portable project of a portable app. But is there a combined control that lets you choose date and time at once (like DateTimePicker in Windows forms)? Please have a look at the iOS Settings > General > Date & Time (http://www.iphonefaq.org/images/archives/pangu-date.jpg).
或者在创建这样的控件方面我缺少什么?
Or is there anything I am missing on how to create such a control?
推荐答案
Xamarin.Forms
的控件内没有股票" DateTimePicker
.
There is not a "stock" DateTimePicker
within the controls for Xamarin.Forms
.
您可以在模式弹出窗口中使用DatePicker
和TimePicker
创建复合控件,并显示Date
&在Label
s中选择的Time
...
You could create your composite control using DatePicker
and TimePicker
within modal popups and display the Date
& Time
chosen in Label
s...
或使用自定义渲染创建自己的Form控件:
Or create your own Form control using custom renders:
这篇关于Xamarin中是否有一个datetimepicker类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!