WF4: How to get ActivityDesigner from an Activity

I have an Activity called CustomActivity with a Property Source to hold another activity. For getting the reference to the ActivityDesigner of teh Activity referenced by teh Source porperty, I can use the following code

(cusomActivityModelItem.Properties[“Source”].Value).View

cusomActivityModelItem => refers to the ModelItem of the CustomActivity

cusomActivityModelItem.Properties[“Source”].Value => refers to the Activity assigned to the Source property.

(cusomActivityModelItem.Properties[“Source”].Value).View => returns the ActivityDesigner corresponding to the referenced Activity

Advertisements

About ambilykk

I am a Technology Evangelist on Microsoft Technologies. I am carrying the passion on Microsoft technologies specifically on web technologies such as ASP .Net and Ajax. My interests also include Azure and Visual Studio. Technology adoption and learning is my key strength and technology sharing is my passion.
This entry was posted in WF, WF4. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s