views:

167

answers:

1

Is it possible to show a windows form when implementing a custom activity?

For instance, how do I show a custom form, when a user double-clicks on my activity in the designer?

Or perhaps a custom form could be displayed when a user clicks the ... in the properties selection.

A: 

I'm not to sure if that can be done.

For any interaction required with my custom activities I would create a number of dependency properties which would appear in the properties window for the custom activity when it gets dragged onto the designer.

e.g. From property for custom email activity

public static DependencyProperty FromProperty = DependencyProperty.Register("From", typeof(string), typeof(SendMailActivity));

[DescriptionAttribute("The email of the sender")]
[CategoryAttribute("Parameters")]
[BrowsableAttribute(true)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
public string From
{
    get
    {
        return ((string)(base.GetValue(SendMailActivity.FromProperty)));
    }
    set
    {
        base.SetValue(SendMailActivity.FromProperty, value);
    }
}
kevchadders