说明
Type 取 line / circle,Percent 为 0-100,ColorName 支持具体色值。
常见能力:
- 线性/环形
- 语义色与自定义色
- 标签文字
- 自定义节点
用法
<Progress Percent="68" Label="68%" />
<Progress Type="circle" Percent="80" Size="120" />
API 参数
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
ChildContent |
RenderFragment |
null |
|
Color |
string |
"primary" |
色调:primary / success / warning / danger / info。 |
ColorName |
string |
null |
自定义颜色(CSS 颜色值),优先于 Color。 |
Height |
int |
8 |
条形高度(px)。 |
Label |
string |
null |
|
Percent |
double |
0 |
百分比 0-100。 |
PercentChanged |
EventCallback<double> |
— | 事件 |
Size |
int |
100 |
|
Type |
string |
"line" |
类型:line / circle(ring 亦可)。 |
Visible |
bool |
true |
取得或设置组件是否可见,默认为false。 |
VisibleChanged |
EventCallback<bool> |
— | 事件 取得或设置组件可见性变化时的回调事件。 |
Class |
string |
null |
取得或设置组件的CSS类名,用于自定义样式。 |
Disabled |
bool |
false |
取得或设置组件是否禁用,默认为false。 |
Style |
string |
null |
取得或设置组件的内联样式,用于自定义样式。 |
所有组件均继承
BaseComponent,除上表参数外还支持Class、Style、Disabled、Visible。
扫码关注公众号
扫码加入 QQ 群