开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜