The engine that powers RadExpressionEditor enables us to parse a string into a LINQ expression, which can be consumed by any API accepting a LINQ expression.

RadExpressionEditor always generates a LambdaExpression with one parameter. The type of the parameter is inferred from the value of the Item property of RadExpressionEditor instance. For more information on lambdas, please refer to the Lambdas help topic.

Once the Expression is available, you can also compile it manually like so:

Telerik UI for WPF Ninja image

The Expressions is part of Telerik UI for WPF, a professional grade UI library with 160+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

var expr = (LambdaExpression)ExpressionEditor.Expression; 
if (expr != null) 
    var newBody = System.Linq.Expressions.Expression.Convert(expr.Body, typeof(int)); 
    var expr2 = System.Linq.Expressions.Expression.Lambda(newBody, expr.Parameters) as Expression<Func<Club, int>>; 
    var func = expr2.Compile(); 

Here are the basic concepts of the expression engine:

In this article