Hi,
I am building a number of Custom Activities in Windows Workflow and I need to add a DependencyProperty which can list a number of values for that property which the user can then select when using the activity.
e.g. True or False.
I know how to simply pass a default using the PropertyMetadata, and presume that I will have to pass a list/class now the PropertyMetadata?
Has anyone already got an example of how to do this please?
(Example Code below)
public static DependencyProperty TestProperty = DependencyProperty.Register("Test", typeof(string), typeof(CheckActivity), new PropertyMetadata("True"));
/// <summary>
/// Dependency property for 'TestProperty'
/// </summary>
[DescriptionAttribute("Whether a True/False entry is required")]
[CategoryAttribute("Settings")]
[BrowsableAttribute(true)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
public string Type
{
get
{
return ((string)(base.GetValue(CheckActivity.TestProperty)));
}
set
{
base.SetValue(CheckActivity.TestProperty, value);
}
}