Represents a Binding converter that converts a DateTime
to one of its string representations.
Namespace:
C1.WPF.C1ScheduleAssembly: C1.WPF.C1Schedule (in C1.WPF.C1Schedule.dll)
Syntax
C# |
---|
[ValueConversionAttribute(typeof(DateTime), typeof(string))] public class DateTimeToStringConverter : IValueConverter |
Visual Basic (Declaration) |
---|
<ValueConversionAttribute(GetType(DateTime), GetType(String))> _ Public Class DateTimeToStringConverter _ Implements 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.