Windows Workflow Foundation: Custom activity property dialog?

  • Thread starter Thread starter Jon Davis
  • Start date Start date
J

Jon Davis

Is it possible to have a custom dialog for setting the properties of a custom WF activity?

For example, in the designer, if you drag-and-drop a custom control onto the flow chart, I would like to be able to double-click the flow node and open a pre-built modal dialog box that sets the node's properties, rather than jump into the code-beside window.

Jon
 
Is it possible to have a custom dialog for setting the properties of a custom WF activity?

For example, in the designer, if you drag-and-drop a custom control onto the flow chart, I would like to be able to double-click the flow node and open a pre-built modal dialog box that sets the node's properties, rather than jump into the code-beside window.

I'm very interested in this, too. If you find an answer elsewhere, can
you please post it to this thread?
 
Is it possible to have a custom dialog for setting the properties of a custom WF activity?

For example, in the designer, if you drag-and-drop a custom control onto the flow chart, I would like to be able to double-click the flow node and open a pre-built modal dialog box that sets the node's properties, rather than jump into the code-beside window.

I'm very interested in this, too. If you find an answer elsewhere, can
you please post it to this thread?
 
I truncated the sample to the following minimal demonstration. Add this to a workflow project, compile, then add the activity to a workflow designer and double-click it.


using System;
using System.Workflow.ComponentModel;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Workflow.ComponentModel.Design;
namespace WorkflowConsoleApplication1
{
[Designer(typeof(MyHelloWorldActivity.Designer), typeof(IDesigner))]
public class MyHelloWorldActivity : Activity
{
public class Designer : ActivityDesigner
{
protected override void OnMouseDoubleClick
System.Windows.Forms.MouseEventArgs e)
{
System.Windows.Forms.MessageBox.Show("hello world");
}
}
}
}
 
Of course, this only demonstrates the event handler. It does not demonstrate saving the modified properties successfully, which is what the original link to http://blogs.msdn.com/tomlake/archive/2006/06/05/618185.aspx was all about.

Jon

I truncated the sample to the following minimal demonstration. Add this to a workflow project, compile, then add the activity to a workflow designer and double-click it.


using System;
using System.Workflow.ComponentModel;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Workflow.ComponentModel.Design;
namespace WorkflowConsoleApplication1
{
[Designer(typeof(MyHelloWorldActivity.Designer), typeof(IDesigner))]
public class MyHelloWorldActivity : Activity
{
public class Designer : ActivityDesigner
{
protected override void OnMouseDoubleClick
System.Windows.Forms.MouseEventArgs e)
{
System.Windows.Forms.MessageBox.Show("hello world");
}
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top