I am trying to add a DatePicker control to my page programmatically, but intellisense is not picking up the DatePicker type as I would expect.
MSDN shows this control as being part of System.Windows.Controls
I have referenced this assembly in my project, and in my usings statement, but still VS cannot recognise the DatePicker type.
I would expect this to work:
using System.Windows.Controls;
namespace MyNamespace
{
public partial class MyClass : UserControl
{
...
public void MyMethod
{
DatePicker datePicker = new DatePicker();
}
...
}
}
Compiler Error: The type or namespace name 'DatePicker' could not be found (are you missing a using directive or an assembly reference?)
Any ideas?
Thanks, Mark