Microsoft.Common.Slider UI 元素

滑块控件允许用户从允许的值范围中进行选择。

UI 示例

Microsoft.Common.Slider UI 元素的屏幕截图,其中包含允许的值范围。

图式

{
  "name": "memorySize",
  "type": "Microsoft.Common.Slider",
  "min": 1,
  "max": 64,
  "label": "Memory",
  "subLabel": "MB",
  "defaultValue": 24,
  "showStepMarkers": false,
  "toolTip": "Pick the size in MB",
  "constraints": {
    "required": false
  },
  "visible": true
}

示例输出

26

注解

  • 需要 minmax 值。 设置滑块的起点和终点。
  • 属性 showStepMarkers 默认为 true。 仅当从最小值到最大值的范围为 100 或更少时,才会显示步骤标记。

后续步骤