【发布时间】:2017-09-14 03:43:36
【问题描述】:
无论按钮的宽度/高度如何,如何将 Xamarin Forms 中的 Button 声明为药丸按钮?有没有办法在不诉诸本机自定义渲染器的情况下做到这一点?我想 100% 在 XAML 中做到这一点。
【问题讨论】:
标签: xaml xamarin xamarin-forms
无论按钮的宽度/高度如何,如何将 Xamarin Forms 中的 Button 声明为药丸按钮?有没有办法在不诉诸本机自定义渲染器的情况下做到这一点?我想 100% 在 XAML 中做到这一点。
【问题讨论】:
标签: xaml xamarin xamarin-forms
您可以在Button 上指定BorderRadius 属性以圆角看起来像药丸。
【讨论】:
没有自定义渲染器是不可能的。但这里有一篇很好的文章:http://www.wintellect.com/devcenter/jprosise/supercharging-xamarin-forms-with-custom-renderers-part-2
【讨论】: