June 2009 Entries

Hunt the Class

Popquiz - in which .NET assembly is System.Drawing.Design.UITypeEditor? 1) System.Design2) System.Windows.Forms3) System.ComponentModel4) System.Drawing5) System.Drawing.DesignA little background to help you choose:When you want to make a property of a custom type editable via a modal dialog from within a PropertyGrid control (from the System.Windows.Forms assembly), you need to decorate the type with an EditorAttribute (from the System.ComponentModel assembly), to which you must pass the type of a class that inherits from UITypeEditor. Your UITypeEditor class must use the IWindowsFormsEditorService (again, from the System.Windows.Forms assembly, but located in the System.Windows.Forms.Design namespace) so that it may supply a WinForms Form object (System.Windows.Forms again)...

posted @ Wednesday, June 03, 2009 10:01 PM | Feedback (0)