ジェネリック型のすべてのインスタンスに対してカスタム UI エディターを指定するにはどうすればよいですか? タイプは、私が所有していない別のアセンブリで定義されています。
これは、 https://stackoverflow.com/a/849778/284795に触発されて試したものですが、効果はありませんでした(古いエディターは残っています)。ここでは、ジェネリック型List<>
とカスタム エディターDateTimeeditor
- ナンセンスですが、これは単なる例です。
TypeDescriptor.AddAttributes(typeof(List<>),new EditorAttribute(typeof(System.ComponentModel.Design.DateTimeEditor),typeof(UITypeEditor)));
TypeDescriptor.GetEditor(new List<int>(),typeof(UITypeEditor)).Dump();