Hi,
Based on this small sample, opening the DateTimePicker from an expander shows the expected time, without resets at 00:00:00.
Based on this small sample, opening the DateTimePicker from an expander shows the expected time, without resets at 00:00:00.
<Window x:Class="WpfApplication40.MainWindow"
x:Name="CurrentWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Expander>
<xctk:DateTimePicker Margin="5" MinWidth="100" Value="{Binding StartTimeDateTime, ElementName=CurrentWindow}" Format="Custom" FormatString="yyyy/MM/dd,HH:mm:ss" AutoCloseCalendar="True" />
</Expander>
</Grid>
</Window>
public partial class MainWindow : Window
{
public MainWindow()
{
this.StartTimeDateTime = new DateTime( 2010, 7, 31, 13, 30, 0 );
InitializeComponent();
}
public DateTime StartTimeDateTime
{
get;
set;
}
}