TimeSpanPicker without seconds?

May 30, 2012 at 6:15 PM

Hi,

I'd like to know if there is any way to display a timespanpicker without a seconds component. In other words, the user should only select hours and minutes, not seconds. 

 

Thanks,

 

Adrian 

Coordinator
May 30, 2012 at 9:42 PM

Hey Adrain, it can do that.  A How to is on the documentation tab at (http://coding4fun.codeplex.com/wikipage?title=TimeSpanPicker&referringTitle=Documentation) and is in the test applicaiton as well :-)

XAML

<c4fSlToolkitExtender:TimeSpanPicker
   Value="{Binding TimeSpan1Min}"
   Max="{Binding TimeSpan30Min}"
   Step="{Binding TimeSpan5Min}" />

C#

public TimeSpan TimeSpan1Min { get { return TimeSpan.FromMinutes(1); } }

public TimeSpan TimeSpan5Min { get { return TimeSpan.FromMinutes(5); } }

public TimeSpan TimeSpan10Min { get { return TimeSpan.FromMinutes(10); } }

public TimeSpan TimeSpan30Min { get { return TimeSpan.FromMinutes(30); } }

Jun 2, 2012 at 10:17 PM

Thanks a lot! :-)

Coordinator
Jun 15, 2012 at 6:39 PM

np, happy you're using the controls!