Reputation: 10055
i'm looking for a control, that allow select both date and time. Default DatePicker doesn't allow it. But custom controls (like Extended WPFToolkit) are expensive, anothers are not free...
Upvotes: 3
Views: 3460
Reputation: 10055
At the moment I posted it I came to a solution. So I leave it here if someone needs it:
<DatePicker Name="Picker">
<DatePicker.Resources>
<Style TargetType="DatePickerTextBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<TextBox Text="{Binding Path=SelectedDate, RelativeSource={RelativeSource AncestorType=DatePicker}, StringFormat={}{0:dd/MM/yyyy hh:mm:ss}}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DatePicker.Resources>
</DatePicker>
Upvotes: 4