FileSizeConverter
Class
Converts a file size in bytes (long) to a human-readable string (e.g. "1.5 MB").
Definition
Namespace:Telerik.Windows.Controls.ConversationalUI
Assembly:Telerik.Windows.Controls.dll
Syntax:
C#
public class FileSizeConverter : IValueConverter
Inheritance: objectFileSizeConverter
Implements:
Constructors
C#
public FileSizeConverter()
Methods
Converts a numeric byte count to a formatted file size string.
C#
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
The file size in bytes.
targetTypeTypeThe type of the binding target property.
parameterobjectThe converter parameter (not used).
cultureCultureInfoThe culture to use in the converter.
Returns:A human-readable file size string such as "512 B", "1.5 KB", "3.2 MB", or "1.1 GB".
Not supported. Throws NotSupportedException.
C#
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)