开发者

Using internal Microsoft editors in custom workflow activities

开发者 https://www.devze.com 2023-03-16 23:06 出处:网络
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

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开发者_C百科 property in property grid I get NullPointerException. You can see stacktrace on screenshot below:

Using internal Microsoft editors in custom workflow activities

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消