Dynamically binding the expression type in the property grid

Previously, I demonstrated how to use an ExpressionTextBox in a custom property editor. In this followup post, I will show how to dynamically bind the ExpressionType of the ExpressionTextBox to the type of the argument of the custom activity. We don’t provide a type converter for this out of the box, so you have to…


Using an ExpressionTextBox in a custom property editor

I have fielded a couple of questions from customers and also a forum post asking how to get the binding correct for the ExpressionTextBox correct in the property grid (well Eric fielded that one with some help on our side, thanks Eric!). For the record here are the details and an explanation. WPF provides an…


Imports designer 101

Oh, the imports designer. This innocuous looking piece of UI packs a lot of functionality in a little designer. You would think that this designer should be pretty straightforward. The original concept of this feature was that this would simply be the place to manage namespaces, much in the same way you would manage using…


About type coercion

The hosted compiler does something called type coercion. It converts one type to another type using the widening and narrowing conversions specified by the big VB compiler. On the whole, this is very useful functionality. It allows you to strongly type your arguments but still set your Int16 variable to 5 or your string variable…


Expression serialization and literal support

Expressions created in the WF designer are serialized using square brackets, which is shorthand for VisualBasicValue<T> or VisualBasicReference<T>. For example, drop a WriteLine activity into a Workflow, and set its text to the expression (1+2).ToString (in VB you can omit the brackets after the ToString). Save your workflow, open it in XAML view (F7 is…


End-to-end expression editing feature deck

Hi, today I gave a talk to our support team about the expression editing feature. Since this is all public facing information, I thought I would post the deck. Some of this information is old hat to regular readers of this blog (especially the overview and programmability bits, which I ported straight from previous blog…


Enter and Tab key handling in the ExpressionTextBox

The Enter and Tab keys work a bit differently in the ExpressionTextBox than in the big VB IDE. In the big IDE, Enter and Tab always insert their associated characters. If the IntelliSense completion list is up, Enter selects the item and inserts a new line. We noticed that big IDE behavior does not always…


ExpressionTextBox – works on Activity properties too!

So Matt Winkler read my previous post and said hey, what about properties of type Activity<foo>, can’t they be bound to ExpressionTextBoxes too? Snap, I had forgotten about that case. The answer is actually yes, because VisualBasicValue and VisualBasicReference derive from Activity, expressions are then assignable to Activity and then the activity can be scheduled….


ExpressionTextBox – for arguments only (well mostly)

[12/19 edit: ExpressionTextBox is not strictly for arguments only, see the exception here] In a previous post I alluded to the fact that you should be able to bind an ExpressionTextBox to a CLR property. My hazy memory was that this was done at one point in time by omitting the ArgumentToExpressionConverter from the Expression…


Using untyped arguments in an ExpressionTextBox

The ExpressionTextBox sample code in the SDK works just fine in beta 2. The sample demonstrates the use of an ExpressionTextBox in a custom activity designer. In the sample, I implemented a simple MultiAssign activity, which assigns two values to two variables. In the example, I used untyped InArguments and OutArguments. That particular example was…