[]
        
(Showing Draft Content)

C1.WPF.Schedule.DateTimeToStringConverter

DateTimeToStringConverter Class

Represents a Binding converter that converts a DateTime to one of its string representations.

Inheritance
DateTimeToStringConverter
Implements
Namespace: C1.WPF.Schedule
Assembly: C1.WPF.Schedule.dll
Syntax
[ValueConversion(typeof(DateTime), typeof(string))]
public class DateTimeToStringConverter : IValueConverter
Remarks

DateTimeToStringConverter is a two-way converter. The source value must be the DateTime, and a target value is a string that represents the DateTime according to a format specifier defined in a converter parameter. The format specifier definition rules are the same as used in the System.DateTime.ToString(format) method. A back conversion is performed via the DateTime.DateTime.TryParseExact method if converter parameter is specified; otherwise, the DateTime.DateTime.TryParse method is used.

Constructors

Name Description
DateTimeToStringConverter()

Initializes a new instance of the DateTimeToStringConverter.

Fields

Name Description
Default

Gets an instance of DateTimeToStringConverter.

Methods

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.