2011-07-04 29 views
0

我正在使用Workflow 4.0創建自定義活動,並且我想使用現有的Microsoft屬性編輯器。準確地說,我想使用SendContentPropertyEditor。這個類是內部的,但我希望,我將能夠使用它使用下面的代碼:在自定義工作流活動中使用內部Microsoft編輯器

[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異常。你可以看到下面的截圖堆棧跟蹤:

enter image description here

你有任何想法如何解決這個問題,這樣將有可能使用該編輯器?

回答

0

也許創建一個使用反射的包裝器DialogPropertyValueEditor。

相關問題