locked
How to use Attached Property in WF RRS feed

  • Question

  • *Senario:

    I declare an Attached Property "MyAttachedProperty" in Activity1, following the conventions: call RegisterAttached(), define public static GetMyAttached() and SetMyAttached(), etc.

    I have another simple dummy activity, say, Activity2. I create a simple sequential workflow by chaining Activity1 to Activity2.

    At the designer surface of VS2005, I click at Activity2 in the workflow, then I look at the property grid window, I expect something like "MyAttached" or "Activity1.MyAttached" shows up in the grid, just like the regular properties of Activity2.

    But I do not see it.

    *Question:

    1. Why?

    Did I miss something when I declare the Attched Property?

    Or I misused the desiger of VS2005?

    Or VS2005 does not show Attached Property at all?  

    Or, something related to WF? (from some post on the internet, I got an impression that Attached Property is not well supported and widely utilized in WF as it is in WPF)

    Or my expectation is just too high?

    2. If my expactation is too high, here is more question. I understand the purpose or the beauty of Attached Property is: to allow me to declare a property in Activity1 and "stick" the property to other activity (or subclass of DependencyObject), without changing the code of the other activity (in lots of case the code is not even available). Do I understand correctly? If so, how should I properly use Attached Property to acheive the design purpose of it?

    Thanks a lot!

    Friday, December 15, 2006 10:33 PM

Answers

All replies