<p>I have a Windows application that uses a .NET PropertyGrid control.  Is it possible to change the type of control that is used for the value field of a property?</p>

<p>I would like to be able to use a RichTextBox to allow better formatting of the input value.
Can this be done without creating a custom editor class?</p>

[{'answer_id': 72538, 'author': 'GEOCHET', 'author_id': 5640, 'author_profile': 'https://Stackoverflow.com/users/5640', 'pm_score': 0, 'selected': False, 'text': '<p>I think what you are looking for is Custom Type Descriptors.\nYou could read up a bit and get started here: <a href="http://www.codeproject.com/KB/miscctrl/bending_property.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/miscctrl/bending_property.aspx</a></p>\n\n<p>I am not sure you can do any control you want, but that article got me started on propertygrids.</p>\n'}, {'answer_id': 72607, 'author': 'Roger Lipscombe', 'author_id': 8446, 'author_profile': 'https://Stackoverflow.com/users/8446', 'pm_score': 1, 'selected': False, 'text': "<p>You can control whether the PropertyGrid displays a simple edit box, a drop-down arrow, or an ellipsis control.</p>\n\n<p>Look up EditorAttribute, and follow it on from there. I did have a sample somewhere; I'll try to dig it out.</p>\n"}, {'answer_id': 72651, 'author': 'Phil Wright', 'author_id': 6276, 'author_profile': 'https://Stackoverflow.com/users/6276', 'pm_score': 3, 'selected': True, 'text': '<p>To add your own custom editing when the user selects a property grid value you need to implement a class that derives from UITypeEditor. You then have the choice of showing just a small popup window below the property area or a full blown dialog box.</p>\n\n<p>What is nice is that you can reuse the existing implementations. So to add the ability to multiline edit a string you just do this...</p>\n\n<pre><code>[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]\npublic override string Text\n{\n    get { return _string; }\n    set { _string = value; }\n}\n</code></pre>\n\n<p>Another nice one they provide for you is the ability to edit an array of strings...</p>\n\n<pre><code>[Editor("System.Windows.Forms.Design.StringArrayEditor, \n         System.Design, Version=2.0.0.0, \n         Culture=neutral, \n         PublicKeyToken=b03f5f7f11d50a3a", \n         typeof(UITypeEditor))]\npublic string[] Lines\n{\n    get { return _lines; }\n    set { _lines = value; }\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/72515', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2533/']