Table of Contents

Class SpeedConverter

Namespace
Tudormobile.Strava.UI.Converters
Assembly
Tudormobile.Strava.UI.dll

Converts speed values to formatted string representations based on the specified unit.

public class SpeedConverter : IValueConverter
Inheritance
SpeedConverter
Implements
Inherited Members

Methods

Convert(object?, Type, object?, CultureInfo?)

Converts a speed value to a formatted string representation based on the specified unit.

public object Convert(object? value, Type targetType, object? parameter, CultureInfo? culture = null)

Parameters

value object

The value to convert. Can be a SummaryActivity, ActivityView, double, or string.

targetType Type

The type of the binding target property.

parameter object

The converter parameter to use. Specify "meters" to use metric units.

culture CultureInfo

The culture to use in the converter.

Returns

object

A formatted string representing the speed in either km/h or mph.

Exceptions

NotSupportedException

Thrown if the value type is not supported.

ConvertBack(object?, Type, object?, CultureInfo?)

Converts a value back to its original type. This method is not implemented.

public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo? culture = null)

Parameters

value object

The value that is produced by the binding target.

targetType Type

The type to convert to.

parameter object

The converter parameter to use.

culture CultureInfo

The culture to use in the converter.

Returns

object

Throws a NotImplementedException.

Exceptions

NotImplementedException

Always thrown as this method is not implemented.