Table of Contents

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

value object

The distance value to convert. Can be of type SummaryActivity, ActivityView, double, or string.

targetType Type

The target type of the binding (not used).

parameter object

An optional parameter specifying the unit ("meters" or "feet").

culture CultureInfo

The 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

value object

The formatted string to convert back.

targetType Type

The target type of the binding (not used).

parameter object

An optional parameter specifying the unit ("meters" or "feet").

culture CultureInfo

The culture information.

Returns

object

Throws a NotImplementedException as this method is not implemented.