Back to Devexpress

ProgressBarEdit.IsPercent Property

wpf-devexpress-dot-xpf-dot-editors-dot-progressbaredit-68664cd6.md

latest2.7 KB
Original Source

ProgressBarEdit.IsPercent Property

Gets or sets whether the value is displayed as a percentage. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public bool IsPercent { get; set; }
vb
Public Property IsPercent As Boolean

Property Value

TypeDescription
Boolean

true to display the value as a percentage; otherwise, false.

|

Remarks

If the IsPercent property is set to true , the progress bar’s value can be displayed as a percentage. Use the editor’s BaseEdit.DisplayFormatString property to specify the format pattern.

Example

This example shows how to display a progress bar’s value as a percentage.

xaml
<dxe:ProgressBarEdit Name="progressBarEdit1" Width="150" Height="22" Maximum="30" Minimum="0" Value="21"
                     IsPercent="True" DisplayFormatString="p0"                               
                     ContentDisplayMode="Value"
                     Foreground="White"/>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsPercent property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-grid-read-only-and-enabled-binding/CS/MainWindow.xaml#L32

xml
<DataTemplate>
    <dxe:ProgressBarEdit Name="PART_Editor" ContentDisplayMode="Value" IsPercent="True" DisplayFormatString="p0"/>
</DataTemplate>

See Also

ProgressBarEdit Class

ProgressBarEdit Members

DevExpress.Xpf.Editors Namespace