C# 在自定义工作流活动中使用内部Microsoft编辑器
我正在使用Workflow 4.0创建自定义活动,并希望使用现有的Microsoft属性编辑器。准确地说,我想使用SendContentPropertyEditor。该类是内部类,但我希望能够使用以下代码使用它:C# 在自定义工作流活动中使用内部Microsoft编辑器,c#,workflow,workflow-foundation-4,C#,Workflow,Workflow Foundation 4,我正在使用Workflow 4.0创建自定义活动,并希望使用现有的Microsoft属性编辑器。准确地说,我想使用SendContentPropertyEditor。该类是内部类,但我希望能够使用以下代码使用它: [Editor("System.ServiceModel.Activities.Presentation.SendContentPropertyEditor, System.Activities.Core.Presentation, Version=4.0.0.0, Culture=n
[Editor("System.ServiceModel.Activities.Presentation.SendContentPropertyEditor, System.Activities.Core.Presentation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(DialogPropertyValueEditor))]
[DefaultValue(null)]
public SendContent SendContent { get; set; }
问题是,当我试图在属性网格中为这个属性设置值时,我得到了NullPointerException。您可以在下面的屏幕截图上看到stacktrace:
您知道如何解决此问题,以便能够使用该编辑器吗?也许可以创建一个使用反射的包装器对话框PropertyValueEditor