c# - How to set default time for TimePicker control -


in wpf application, i've used timepicker control extended wpf toolkit. when run application, timepicker control should display default value "12:00 am". it's showing me blank. how achieve 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 below properties:

public string starttimebinding  {      set     {          this._id = value;     }          {          return this._started_at.tostring("h:mm tt");     }  }  public string stoptimebinding  {      set     {         this._id = value;     }          {          return this._ended_at.tostring("h:mm tt");     }  } 

try removing tostring(h:mm tt") properties , change type datetime. timepicker control binds datetime, not string.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -