Search code examples
c#.netwinformspropertygrid

Multi-line string in a PropertyGrid


Is there a built-in editor for a multi-line string in a PropertyGrid.


Solution

  • I found that System.Design.dll has System.ComponentModel.Design.MultilineStringEditor which can be used as follows:

    public class Stuff
    {
        [Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
        public string MultiLineProperty { get; set; }
    }