How can I Host the WorkflowDesigner of WorkflowFou

2019-03-01 23:30发布

I don't have much explanation that the tittle himself, lol.

But, what I really want to do is load de WorkflowDesigner on an Winform ElementHost Control.

I try doing this: Host WorkflowDesigner in a WPF Application, but it doesn't work.

Thanks!

1条回答
beautiful°
2楼-- · 2019-03-02 00:04

Solved!

private void Form1_Load(object sender, EventArgs e)
{
    new DesignerMetadata().Register(); //Missing Line

    des = new WorkflowDesigner();
    des.Load(mFileName);
    elementHost1.Child = des.View;
}

Only was needed to add the missing line "new DesignerMetadata().Register();"

Note: elementHost1 is a WinForm ElementHost Control, direct from the toolbox! ;)

查看更多
登录 后发表回答