WPF format displayed text?

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-05-06T23:02:59Z Indexed on 2010/05/06 23:08 UTC
Read the original article Hit count: 151

Filed under:
|
|
|

I have a column defined like this:

<DataGridTextColumn Binding="{Binding Path=FileSizeBytes, Mode=OneWay}" Header="Size" IsReadOnly="True" />

But instead of displaying the file size as a big number, I'd like to display units, but still have it sort by the actual FileSizeBytes. Is there some way I can run it through a function or something before displaying it?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about .net-4.0