你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.Common.CheckBox UI 元素

CheckBox 控件允许用户检查或不检查某选项。 控件在 true 选中控件或 false 未选中时返回。

UI 示例

处于未选中状态的 Microsoft.Common.CheckBox UI 元素的屏幕截图。

架构

{
  "name": "legalAccept",
  "type": "Microsoft.Common.CheckBox",
  "label": "I agree to the terms and conditions.",
  "constraints": {
    "required": true,
    "validationMessage": "Please acknowledge the legal conditions."
  }
}

示例输出

true

备注

设置为requiredtrue该复选框时,用户必须选中该复选框。 如果用户未选中该复选框,会显示验证消息。

后续步骤