[]
Represents a Binding converter that converts a TimeSpan value to one of its string representations.
[ValueConversion(typeof(TimeSpan), typeof(string))]
public class TimeToStringConverter : IValueConverter
TimeToStringConverter is a two-way converter. A source value must be a TimeSpan, and a target value is a string that represents the TimeSpan. Converter parameter should contain valid format string corresponding to format strings used in the ToString(string) method. If the converter parameter value is not specified, then the 'T' specifier is used.
Name | Description |
---|---|
TimeToStringConverter() |
Name | Description |
---|---|
Default | Gets an instance of TimeToStringConverter. |
Name | Description |
---|---|
Convert(object, Type, object, CultureInfo) | Converts a value. The data binding engine calls this method when it propagates a value from the binding source to the binding target. |
ConvertBack(object, Type, object, CultureInfo) | Converts a value. The data binding engine calls this method when it propagates a value from the binding target to the binding source. |