How to correctly save a WF4 ActivityBuilder

孤街醉人 提交于 2019-12-03 17:12:38

I think I found the answer.

I have to use the following code before calling Save:

VisualBasic.SetSettings(activityBuilder, new VisualBasicSettings());

If the activityBuilder has been created from a DynamicActivity it is even better to use the following code:

VisualBasic.SetSettings(activityBuilder,
                        VisualBasic.GetSettings(dynamicActivity));

If this is not used, namespaces that are only needed for extension methods are not written to the XAML and will lead to an error when loading and executing the XAML.


I summarized my findings on code project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!