Why is the UITypeEditor "DateTimeEditor" not visible in the object browser?
I'开发者_JAVA百科m writing a custom control (using VS2010 & C#) and it has a property which is a nullable datetime.
Why is it that, when defining my property, I can write this...
[Editor("System.ComponentModel.Design.DateTimeEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
public DateTime? When
{
:
}
...but not this...
[Editor(typeof(System.ComponentModel.Design.DateTimeEditor), typeof(UITypeEditor))]
public DateTime? When
{
:
}
Why is the DateTimeEditor not visible in the object browser (for example) ?
Thanks, Ross
You have to add a reference to System.Design for the DatetimeEditor to be visibile in Object Browser.
精彩评论