【发布时间】:2016-06-30 10:08:24
【问题描述】:
我使用 Messier16.Forms.Controls.Checkbox 在 Xamarin Forms 中为 ios 和 andorid 创建复选框。现在我得到了该复选框,但无论是否选中,我都无法读取值。这是我的代码
Xaml 文件
<StackLayout VerticalOptions="Start" Orientation="Horizontal">
<cbox:Checkbox WidthRequest="45" VerticalOptions="Center" CheckedChanged="MyCheckedMethod"/>
<Label Text="Checkbox Example" VerticalOptions="Center" />
</StackLayout>
.cs 文件
public void MyCheckedMethod(object sender, EventArgs e)
{
bool checked=e.checked;
}
【问题讨论】:
标签: xamarin xamarin.ios xamarin.android xamarin.forms