c# - Window workflow foundation 4.0 (WPF): How to change an activity location in a Flowchart workflow by code -
i use rehosting workflow designer (https://msdn.microsoft.com/en-us/library/dd489419%28v=vs.100%29.aspx) load flowchart workflow in application.
flowchart flowchart = this.createflowchart();///create flowchart workflow workflowdesigner wd = new workflowdesigner(); wd.load(flowchart);
how should change activity location in flowchart?
this not trivial task.
you need alter location of model item via view state service.
wd.context.services.getservice<viewstateservice>().storeviewstatewithundo(modelitem, "shapelocation", new point(20,20));
have read of this article explains view state far better can.