Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The ExpressionTextBox sample shows how to use the ExpressionTextBox in a custom activity designer. The custom activity, MultiAssign, assigns two string values to two string variables. Some ExpressionTextBox controls bind to InArguments and some bind to OutArguments.
Sample details
The ArgumentToExpressionConverter is the type converter used when binding expressions to arguments. The ConverterParameter must be set to In or Out as appropriate. InOut is not supported.
The UseLocationExpression attribute is used on OutArguments to specify that the expression should be an L-value ("left value" or "location value") expression. In most cases, an L-value expression is a valid Visual Basic identifier used to indicate that the OutArgument being returned is a variable or argument name.
The MaxLines attribute is set to one in this example and MinLines is not set. This indicates that the ExpressionTextBox is a fixed size of one line regardless of the amount of text typed by the user. To allow the ExpressionTextBox to grow to fit user input, set MaxLines greater than MinLines.
An ExpressionTextBox can only be bound to arguments, and cannot be bound to CLR properties.
To use this sample
Using Visual Studio, open the ExpressionTextBoxSample.sln file.
To build the solution, press CTRL+SHIFT+B.
To run this sample
Add a new Workflow Console Application to the solution.
Add a reference to the ExpressionTextBoxSample project from the new Workflow Console Application project.
Build the solution.
Drag the MultiAssign activity from the toolbox and drop it into the workflow.