Format decimal for percentage values?

What I want is something like this:

String.Format("Value: {0:%%}.", 0.8526)

Where %% is that format provider or whatever I am looking for.
Should result: Value: %85.26..

I basically need it for wpf binding, but first let’s solve the general formatting issue:

<TextBlock Text="{Binding Percent, StringFormat=%%}" />

6 Answers
6

Leave a Comment