DateTimePicker for WPF 4.0

后端 未结 3 1772
感情败类
感情败类 2020-12-06 17:03

According to this post, there\'s a separate DatePicker control in .net 4. I\'ve tried it, and I don\'t see a good way to also let it select the time of the day.

Is t

相关标签:
3条回答
  • 2020-12-06 17:07

    Try the DateTimePicker in the extended WPF toolkit.

    0 讨论(0)
  • 2020-12-06 17:16

    Extended WPF Toolkit sports a nice DateTimePicker with time of day.

    There is also an article over on CP where someone created a control that works like the Winforms one... A WPF DateTimePicker That Works Like the One in Winforms

    0 讨论(0)
  • 2020-12-06 17:29

    There isn't one without making it yourself or using a 3rd party control. However there is one within winforms if you want a quick fix that doesn't support data binding...

    xmlns:window="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
    xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
    
    <window:WindowsFormsHost >
        <wf:DateTimePicker Format="Time" ></wf:DateTimePicker>
    </window:WindowsFormsHost>
    

    Just a time picker, but could easily be paired with a datepicker. You also need a reference to WindowsFormsIntegration and System.Windows.Forms.

    0 讨论(0)
提交回复
热议问题