简体   繁体   中英

Using internal Microsoft editors in custom workflow activities

I am creating custom activity using Workflow 4.0 and i would like to use existing Microsoft property editor. To be precise i'd like to use SendContentPropertyEditor. This class is internal but i was hoping that i will be able to use it using following code:

[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; }

The problem is when I try to set value to this property in property grid I get NullPointerException. You can see stacktrace on screenshot below:

在此处输入图像描述

Have you any ideas how to resolve this issue so that it will be possible to use that editor?

Maybe create a wrapper DialogPropertyValueEditor that uses reflection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM