Reputation: 41
I have rehosted the Workflow designer, and the base activity that i load is the Activity Builder(workflowDesigner.Load (activityBuilder);)
I basically need to add in some details to the activity, and the value of which the user should not be able to edit (or may be even see on the designer surface). For this I am (currently) adding some arguments as follows where i can add in the extra information.
activityBuilder.Properties.Add (new DynamicActivityProperty
{
Name = "HiddenArgument",
Type = typeof (string),
Value = "Value that the user should not edit."
});
But as these arguments are visible on the designer surface in the Arguments Panel on the bottom of the designer, the user can edit this. i also have other arguments that the user is allowed to edit so therefore i cant disable the whole arguments pane.
I would just want to know how can i add my information to the workflow(and obviously save it in the *.XAML file) so that the user cant edit (or see) this information.
EXTRA DETAILS: I basically want something like, if i create a custom activity i can add properties with [Browsable(false)], which causes the user to not see the property on the right side pane but hold a value!
Upvotes: 4
Views: 1668
Reputation: 3787
[Browsable(false)]
- Only this attribute avoid presentation of this argument in PropertyInspector.
[EditorBrowsable(EditorBrowsableState.Never)]
- doesn't affect avialabitly of this argument from Property Inspector, it make the property inaccessible by intellisense.
[Browsable(false)]
public InArgument<string> Foo { get; set;}
Upvotes: 1
Reputation: 11
EditorBrowsableAttribute is what you would use in a normal argument on a regular Activity.
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public InArgument<string> Foo { get; set;}
Upvotes: 1