【问题标题】:Xamarin Forms Pill ButtonXamarin 形成药丸按钮
【发布时间】:2017-09-14 03:43:36
【问题描述】:

无论按钮的宽度/高度如何,如何将 Xamarin Forms 中的 Button 声明为药丸按钮?有没有办法在不诉诸本机自定义渲染器的情况下做到这一点?我想 100% 在 XAML 中做到这一点。

【问题讨论】:

    标签: xaml xamarin xamarin-forms


    【解决方案1】:

    您可以在Button 上指定BorderRadius 属性以圆角看起来像药丸。

    【讨论】:

    • 现在可以了。遗憾的是你不能回到 2015 年 :)
    【解决方案2】:

    没有自定义渲染器是不可能的。但这里有一篇很好的文章:http://www.wintellect.com/devcenter/jprosise/supercharging-xamarin-forms-with-custom-renderers-part-2

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-02
      • 2012-05-22
      • 2020-01-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多