Search code examples
dsldsl-toolsvisual-studio-designer

How to add multi line string property on DSL


I am developing a workflow designer by DSL tools (Domain Specific Language) in Visual Studio,

I want to add a multi line string property as a domain property on one of my domain classes.

When I add it as string, it's only 1 line of string.

This is what I am looking for, something like Notes in DSL designer.

enter image description here


Solution

  • I found the solution, in case somebody else is looking for it too.

    So we need to add UITypeEditor, by adding this as CustomAttribute on domain property

    [System.ComponentModel.Editor(
                typeof(System.ComponentModel.Design.MultilineStringEditor),
                typeof(System.Drawing.Design.UITypeEditor))]
    

    Also System.design.dll should be added to solution too

    More info at https://msdn.microsoft.com/en-us/library/cc512860.aspx?f=255&MSPPError=-2147217396