In my WPF application, I've used TimePicker control from extended WPF Toolkit. When I run application, TimePicker control should display default value as "12:00 AM". Currently it's showing me blank. How to achieve this result?
Xaml code:
<xctk:TimePicker x:Name="StartValue" Value="{Binding StartTimeBinding,
ElementName=MainWin, Mode=TwoWay}" Format="Custom" FormatString="hh:mm tt"
Background="Yellow" Padding="0" Margin="0" BorderThickness="0" Width="100"
EndTime="11:59:0"/>
<xctk:TimePicker x:Name="StopValue" Value="{Binding StopTimeBinding,
ElementName=MainWin, Mode=TwoWay}" Format="Custom" FormatString="hh:mm tt"
Background="Yellow" Padding="0" Margin="0" BorderThickness="0" Width="60"
EndTime="11:59:0"/>
TimePicker
controls bound to below properties:
public string StartTimeBinding
{
set
{
this._id = value;
}
get
{
return this._started_at.ToString("h:mm tt");
}
}
public string StopTimeBinding
{
set
{
this._id = value;
}
get
{
return this._ended_at.ToString("h:mm tt");
}
}