Progress Bar
The progress bar presents a value as a proportionately filled bar, with the option to show a caption.
Useful Properties
You will probably use these properties most often:
Property | Description |
---|---|
Minimum | Minimum value. |
Maximum | Maximum value. |
Value | Current value. |
Foreground | The bar color. |
ShowProgressText | Determines if the progress bar shows the value as a caption. |
注意
The progress caption always shows the value with a percentage sign. This is only correct when the maximum to minimum range is 0 to 100.
Example
<StackPanel Margin="20">
<ProgressBar Margin="0 10" Height="20"
Minimum="0" Maximum="100" Value="14"
ShowProgressText="True"/>
<ProgressBar Margin="0 10" Height="20"
Minimum="0" Maximum="100" Value="92"
Foreground="Red"
ShowProgressText="True"/>
</StackPanel>
More Information
信息
For the complete API documentation about this control, see here.
信息
View the source code on GitHub ProgressBar.cs