This project is read-only.

Date Time Picker null instance

Nov 22, 2012 at 2:45 PM


I'm using White on WPF project. I've tried to use to an instance of DateTimePicker but it is always null. This is my code:

DateTimePicker startDatePicker = createProjectWindow.Get<DateTimePicker>("StartDatePicker");

Assert.AreEqual(DateTime.Today, startDatePicker.Date);




Nov 22, 2012 at 6:43 PM
We have found similar issue in white. Try using code similar to

var startDatePicker = createProjectWindow.Get("StartDatePicker") as DateTimePicker;

this have "fixed" our problem.
Nov 23, 2012 at 12:33 PM

Thanks for your response, but it doesn't work in my case. I forgot to mention that in the project the control type is DatePicker (not DateTimePicker), could this cause the problem? 

Nov 25, 2012 at 5:56 AM

Its hard to reply w/o access to your application..