3
我正在使用設計師重新託管示例,並試圖將泛型類型放入工具箱中,但似乎無法使其工作。Rehosting Workflow 4 Designer將foreach活動添加到工具箱
我試過XAML基於:基於
<sapt:ToolboxItemWrapper AssemblyName="{StaticResource AssemblyName}">
<sapt:ToolboxItemWrapper.ToolName>
System.Activities.Statements.ForEach
</sapt:ToolboxItemWrapper.ToolName>
</sapt:ToolboxItemWrapper>
和代碼:
Type t = Type.GetType("System.Activities.Statements.Foreach, System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
ToolboxItemWrapper w = new ToolboxItemWrapper(t);
category.Add(w);
但他們都不似乎工作。有什麼建議麼?
當我一般活動的類型,它給了我一個空類型(因爲它是通用的,我不指定泛型類型),如果我用ForEachWithBodyFactory同樣適用。 – gbanfill 2010-03-31 16:04:11
請參閱我添加到響應中的代碼示例。 – Maurice 2010-03-31 18:03:59