本文整理汇总了C#中CheckBox类的典型用法代码示例。如果您正苦于以下问题:C#CheckBox类的具体用法?C#CheckBox怎么用?C#CheckBox使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:OnCreate
protectedasyncoverridevoidOnCreate(Bundlebundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.view_expense);
dialog=ServiceContainer.Resolve
();
varid=Intent.GetIntExtra("ID",-1);
viewModel=ServiceContainer.Resolve();
awaitviewModel.Init(id);
this.ActionBar.Title=viewModel.Title;
viewModel.IsBusyChanged=(busy)=>
{
if(busy)
AndHUD.Shared.Show(this,"Loading...");
else
AndHUD.Shared.Dismiss(this);
};
name=FindViewById(Resource.Id.name);
date=FindViewById(Resource.Id.date);
notes=FindViewById(Resource.Id.notes);
total=FindViewById(Resource.Id.total);
billable=FindViewById(Resource.Id.billable);
category=FindViewById(Resource.Id.category);
category.Adapter=newArrayAdapter(this,global::Android.Resource.Layout.SimpleSpinnerDropDownItem,viewModel.Categories);
category.SetSelection(viewModel.Categories.IndexOf(viewModel.Category));
name.Text=viewModel.Name;
date.DateTime=viewModel.Due;
notes.Text=viewModel.Notes;
total.Text=viewModel.Total;
billable.Checked=viewModel.Billable;
}
原文链接:http://www.jxszl.com/biancheng/C/556738.html