I want a timepicker control in WPF. I found an implementation here.(http://wpftoolkit.codeplex.com/wikipage?title=TimePicker&referringTitle=Home). I have installed it. But couldn't understand how to use it. I don't know what I need to write in the XAML file.
Instructions are provided in the link itself here. Follow these steps and you are good to go -
Install the binaries first from here.
Extract the dll Xceed.Wpf.Toolkit and add reference to this dll in your project.
In XAML add the namespace - xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
4.Then add the instance of TimePickerControl in your xaml -
<Grid>
<xctk:TimePicker Height="30" Width="100" Value="{Binding CurrentDateTime}"/>
</Grid>
In your ViewModel -
private DateTime currentDateTime = DateTime.Now;
public DateTime CurrentDateTime
{
get
{
return currentDateTime ;
}
set
{
currentDateTime = value;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With