Why is the UITypeEditor “DateTimeEditor” not visible in the object browser?
-
04-10-2019 - |
Pergunta
I'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
Solução
You have to add a reference to System.Design for the DatetimeEditor to be visibile in Object Browser.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow