ClassTimeOnlyToTimeSpanConverter
Represents an IValueConverter that converts TimeOnly to TimeSpan and converts back TimeSpan to TimeOnly.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class TimeOnlyToTimeSpanConverter : IValueConverter
Inheritance: objectTimeOnlyToTimeSpanConverter
Implements:
Constructors
TimeOnlyToTimeSpanConverter()
Declaration
public TimeOnlyToTimeSpanConverter()
Methods
Convert(object, Type, object, CultureInfo)
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The value to convert. Should be a TimeOnly instance.
targetType
The type to convert to.
parameter
An optional parameter (not used).
culture
The culture to use for conversion (not used).
Returns
A TimeSpan representation of the TimeOnly value, or the original value if conversion is not possible.
ConvertBack(object, Type, object, CultureInfo)
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The value to convert back. Should be a TimeSpan instance.
targetType
The type to convert back to.
parameter
An optional parameter (not used).
culture
The culture to use for conversion (not used).
Returns
A TimeOnly representation of the TimeSpan value, or the original value if conversion is not possible.