Class DistanceConverter
- Namespace
- Tudormobile.Strava.UI.Converters
- Assembly
- Tudormobile.Strava.UI.dll
Converts distance values to a formatted string representation based on the specified unit (meters or feet).
public class DistanceConverter : IValueConverter
- Inheritance
-
DistanceConverter
- Implements
- Inherited Members
Methods
Convert(object?, Type, object?, CultureInfo?)
Converts a distance value to a formatted string representation.
public object Convert(object? value, Type targetType, object? parameter, CultureInfo? culture = null)
Parameters
valueobjectThe distance value to convert. Can be of type SummaryActivity, ActivityView, double, or string.
targetTypeTypeThe target type of the binding (not used).
parameterobjectAn optional parameter specifying the unit ("meters" or "feet").
cultureCultureInfoThe culture information (optional).
Returns
- object
A formatted string representing the distance in the specified unit.
ConvertBack(object?, Type, object?, CultureInfo?)
Converts a formatted string representation of a distance back to its original value.
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo? culture = null)
Parameters
valueobjectThe formatted string to convert back.
targetTypeTypeThe target type of the binding (not used).
parameterobjectAn optional parameter specifying the unit ("meters" or "feet").
cultureCultureInfoThe culture information.
Returns
- object
Throws a NotImplementedException as this method is not implemented.