Font size in Picker control in xamarin forms

孤街浪徒 提交于 2019-12-04 08:47:49

The underlaying scrollable Xamarin.Form Picker list is handled by native controls such as iOS UIPickerView, Android's DatePicker|TimePicker, ... and access to these controls are internal to the PickerRender class.

You can create custom renderers for each of your targeted platforms and create custom views for each of them.

Example:

On iOS you would need to create a custom UIPickerView class and override the ViewFor method and return a UILabel for each row that has your custom font attributes assigned.

On Android, you would create the standard picker, say a DatePicker, and do a FindViewById to access the various EditTexts that make up that picker and assign the TextSize property to each with your custom font size.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!