diff --git a/src/System.Windows.Forms/src/System/Drawing/Design/UITypeEditor.cs b/src/System.Windows.Forms/src/System/Drawing/Design/UITypeEditor.cs index 5c1471b896a..0226da489b7 100644 --- a/src/System.Windows.Forms/src/System/Drawing/Design/UITypeEditor.cs +++ b/src/System.Windows.Forms/src/System/Drawing/Design/UITypeEditor.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Collections.ObjectModel; using System.ComponentModel; +using System.Drawing.Imaging; using System.IO; namespace System.Drawing.Design @@ -16,9 +17,10 @@ public class UITypeEditor { static UITypeEditor() { + // Our set of intrinsic editors. Hashtable intrinsicEditors = new Hashtable { - // Our set of intrinsic editors. + // System.ComponentModel type Editors [typeof(DateTime)] = "System.ComponentModel.Design.DateTimeEditor, " + AssemblyRef.SystemDesign, [typeof(Array)] = "System.ComponentModel.Design.ArrayEditor, " + AssemblyRef.SystemDesign, [typeof(IList)] = "System.ComponentModel.Design.CollectionEditor, " + AssemblyRef.SystemDesign, @@ -26,7 +28,17 @@ static UITypeEditor() [typeof(byte[])] = "System.ComponentModel.Design.BinaryEditor, " + AssemblyRef.SystemDesign, [typeof(Stream)] = "System.ComponentModel.Design.BinaryEditor, " + AssemblyRef.SystemDesign, [typeof(string[])] = "System.Windows.Forms.Design.StringArrayEditor, " + AssemblyRef.SystemDesign, - [typeof(Collection)] = "System.Windows.Forms.Design.StringCollectionEditor, " + AssemblyRef.SystemDesign + + // System.Windows.Forms type Editors + [typeof(Collection)] = "System.Windows.Forms.Design.StringCollectionEditor, " + AssemblyRef.SystemDesign, + + // System.Drawing.Design type Editors + [typeof(Bitmap)] = "System.Drawing.Design.BitmapEditor, " + AssemblyRef.SystemDrawingDesign, + [typeof(Color)] = "System.Drawing.Design.ColorEditor, " + AssemblyRef.SystemDrawingDesign, + [typeof(Font)] = "System.Drawing.Design.FontEditor, " + AssemblyRef.SystemDrawingDesign, + // no way to add Font.Name and associate it with FontNameEditor + [typeof(Image)] = "System.Drawing.Design.ImageEditor, " + AssemblyRef.SystemDrawingDesign, + [typeof(Metafile)] = "System.Drawing.Design.MetafileEditor, " + AssemblyRef.SystemDrawingDesign, }; // Add our intrinsic editors to TypeDescriptor.