【问题标题】:I want to Display Square Checkbox on IOS ,IPad in xamarin form我想以 xamarin 形式在 IOS、iPad 上显示方形复选框
【发布时间】:2021-06-20 20:10:15
【问题描述】:
This Below is my IOS Page .I want to show this type of check box on iOS in xamarin form. I have use Xamarin 5.0 version. When I am try to use check element in iOS show rounded check box but I want square check box.

 <CheckBox  x:Name="chkRememberMe"  BackgroundColor="#7E7E7E" SizeChanged="20" IsChecked="False" CheckedChanged="ChkRememberMe_OnCheckedChanged" ></CheckBox>

这是我的复选框代码,我可以在 iOS 中为方形复选框做什么。我对 xamarin.forms 完全陌生,我需要添加一个复选框、单选按钮和下拉列表。我尝试了一些来自网络的样本,但我无法获得复选框。谁能帮我实现。Controls.Checkbox 在 Xamarin Forms 中为 ios 和 andorid 创建复选框。现在我得到了复选框,但我无法读取它是否被选中的值。这是我的代码

【问题讨论】:

    标签: xamarin xamarin.ios xamarin.ios-binding


    【解决方案1】:

    您可以使用来自 nuget 的插件 Xamarin.Forms.InputKit

    xmlns:input="clr-namespace:Plugin.InputKit.Shared.Controls;assembly=Plugin.InputKit"
    
     <input:CheckBox Text="xxx" Type="Check"/>
    

    如果要自定义复选框的样式,可以勾选https://github.com/enisn/Xamarin.Forms.InputKit/wiki/CheckBox

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-09-23
      • 1970-01-01
      • 2018-06-22
      • 1970-01-01
      • 2020-06-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多