Im using the Datepicker control to get a date and display it in a Textblock in WP7. I want it to only show the date and not the time. The Datepicker only shows the date, but when I want to show it in the TextBlock it shows both date and time. I use databinding to set the date in the Datepicker:
public class Task
{
public DateTime Date { get; set; }
public Task()
{
Date = DateTime.Now;
}
}
XAML:
<toolkit:DatePicker Value="{Binding Mode=TwoWay, Path=Date}" FlowDirection="RightToLeft" />
<TextBlock x:Name="TxbTaskDate" Text="{Binding Date}" />
How do I get the TextBlock to only show the date and not time?