|HomeShow ChangesEditPrintRecent ChangesSubscriptionsLost and FoundFind ReferencesRename
When you add an activity to a workflow and right click on the activity you will see a menu option in the shortcut menu titled: “Promote Bindable Properties…”.
Selecting this will create a dependency property on the workflow for every non dependency property on the activity. With a dependency property you get more control over what can and cannot be done with a property
The property sheet before the promote action.
The property sheet after the promote action.
So suppose you want to promote only a single property to a bindable property? Well in that case the trick is to first create the bindable property in the workflow. Next go the activity, select the property you want to promote, right click on the activity and select "Bind property 'property name'...". If the selected property is not promotable the menu option will be disabled and read "Bind Selected Property..."
The generated code for a Delay activities TimeoutDuration:
PublicShared PromotedDelay_TimeoutDuration1Property As System.Workflow.ComponentModel.DependencyProperty = _ DependencyProperty.Register("PromotedDelay_TimeoutDuration1", _ GetType(System.TimeSpan), GetType(WorkflowConsoleApplication1.Workflow1)) <System.ComponentModel.DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)> _ <System.ComponentModel.BrowsableAttribute(True)> _ <System.ComponentModel.CategoryAttribute("Misc")> _ Public Property PromotedDelay_TimeoutDuration1() As System.TimeSpan Get Return CType(MyBase.GetValue(WorkflowConsoleApplication1.Workflow1.PromotedDelay_TimeoutDuration1Property), System.TimeSpan) End Get Set(ByVal value As System.TimeSpan) MyBase.SetValue(WorkflowConsoleApplication1.Workflow1.PromotedDelay_TimeoutDuration1Property, value) End Set End Property
Gets and sets the duration of the delay in the workflow.
23-11-2009 15:30:33 - -126.96.36.199
This wiki site is supposed to be a shared resource. As a shared resource everyone is encouraged to add new content or modify existing content!
Enjoy the WF wiki.
Click to read this topic
23-11-2009 15:31:34 - anonymous