The Problem SolverWIndows Workflow Foundation
HomeShow ChangesEditPrintRecent ChangesSubscriptionsLost and FoundFind ReferencesRename



19-10-2006 12:21:1019-10-2006 12:20:4619-10-2006 12:20:2819-10-2006 12:18:4319-10-2006 12:18:14

List all versions

Promote Bindable Properties

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
    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
Wiki Usage

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.

Recent Topics