public class DateTimeConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, Sy
You dont need a converter for doing this. You can use the StringFormat
in binding itself to format your selected datetime to show just date in mm/dd/yyyy format.
I tested with this code and it is working fine. XAML:
Model:
public class TestData
{
DateTime start;
public DateTime Start
{
get { return start; }
set { start = value; }
}
}
ViewModel has list of TestData to be bound to DataGrid:
public List TestList { get; set; }