如何在 xamarin 表单中创建复选框 [英] How to create checkbox in xamarin forms

查看:45
本文介绍了如何在 xamarin 表单中创建复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个 xamarin 表单中的复选框控件,以及控件被检查时的事件,我怎样才能得到这个,我正在使用开关控件,但是当 IsChecked 更改时它没有任何事件,我需要对复选框,它不可能在 xamarin 形式的开关控制中

I need a checkbox control in xamarin forms, and also the event when the control is check, how can I get this, I am using switch control, But its not having any event when IsChecked as changed, I need to group the checkbox, its not possible in switch control in xamarin forms

推荐答案

Switch 控件有一个 Toggled 事件,在状态改变时触发.

The Switch control has a Toggled event that will fire when the state is changed.

Forms 没有 Checkbox 控件,因为每个移动平台中都没有底层 Checkbox 控件供其映射.

Forms does not have a Checkbox control because there is no underlying Checkbox control in each mobile platform for it to map to.

XF Labs(XF 的开源扩展集)确实有测试版可能适合您需要的复选框控件.

XF Labs (an open source set of extensions for XF) does have a beta checkbox control that may fit your needs.

这篇关于如何在 xamarin 表单中创建复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆