ClassFileSizeConverter
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:
cs-api-definition
public class FileSizeConverter : IValueConverter
Inheritance: objectFileSizeConverter
Implements:
Constructors
FileSizeConverter()
Declaration
cs-api-definition
public FileSizeConverter()
Methods
Convert(object, Type, object, CultureInfo)
Converts a numeric byte count to a formatted file size string.
Declaration
cs-api-definition
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The file size in bytes.
targetType
The type of the binding target property.
parameter
The converter parameter (not used).
culture
The 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".
ConvertBack(object, Type, object, CultureInfo)
Not supported. Throws NotSupportedException.
Declaration
cs-api-definition
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
targetType
parameter
culture
Returns