ClassHumanReadableFileSizeConverter
Converts a number, representing a file size in bytes, to a human-readable string representation (e.g., KB, MB, GB).
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class HumanReadableFileSizeConverter : IValueConverter
Inheritance: objectHumanReadableFileSizeConverter
Implements:
Constructors
HumanReadableFileSizeConverter()
Declaration
public HumanReadableFileSizeConverter()
Properties
Instance
Gets a static instance of the HumanReadableFileSizeConverter.
Declaration
public static HumanReadableFileSizeConverter Instance { get; }
Property Value
Methods
Convert(object, Type, object, CultureInfo)
Converts a number, representing a file size in bytes, to a human-readable string using the specified format.
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The file size in bytes.
targetType
The target type (not used).
parameter
The format string (optional, defaults to "{0:0.#} {1}").
culture
The culture information (not used).
Returns
A human-readable string representing the file size.
ConvertBack(object, Type, object, CultureInfo)
Not implemented. Throws NotImplementedException.
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The value to convert back.
targetType
The target type.
parameter
The converter parameter.
culture
The culture information.
Returns
Throws NotImplementedException.
Exceptions
Always thrown.