滑块控件允许用户从允许的值范围中进行选择。
{
"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
- 需要
min
和max
值。 设置滑块的起点和终点。 - 属性
showStepMarkers
默认为 true。 仅当从最小值到最大值的范围为 100 或更少时,才会显示步骤标记。
- 有关创建 UI 定义的简介,请参阅 CreateUiDefinition 入门。
- 有关 UI 元素中的公用属性的说明,请参阅 CreateUiDefinition 元素。