Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: DateTimePicker resets time in Expander

$
0
0
Hi,

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;
    }
  }

Viewing all articles
Browse latest Browse all 4964

Trending Articles