Chapter 7. Advanced Authoring


Like other programs you have written, a WF program is a set of program statements that solves some problem. You can write an Open, Sesame program in XAML just like you can write such a program in C#. But, as we saw in Chapters 3, "Activity Execution," and 4, "Advanced Activity Execution," WF programs execute differently than regular C# programs because WF program statementsactivitiesare resumable.

In this chapter, we will take a closer look at how activity types and WF programs are defined. We will begin by focusing on the capabilities of DependencyObject, the class from which Activity derives. This will lead us to discussions of activity metadata, activity databinding, and attached properties.

Additionally, an activity type can be associated with a set of other classes that define different aspects of the activity's functionality. The canonical example of this factoring, in the context of the .NET Framework, is the association of a designer (a class that implements IDesigner) with an IComponent, so that the IComponent can have a visual representation in Visual Studio and in other design environments. Every activity is an IComponent and therefore can be associated with a designer, but the more general point is that this "separation of concerns" approach is a useful design pattern that the WF programming model relies upon to associate different pieces of functionality with any activity type. In the fullest sense, then, an activity is not just a class that derives from Activity. Such a class is certainly the core of any activity you develop, but an activity type is also associated with a designer and other components that collectively define the full capabilities of the activity.




Essential Windows Workflow Foundation
Essential Windows Workflow Foundation
ISBN: 0321399838
EAN: 2147483647
Year: 2006
Pages: 97

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net