hello!
I use ExpressionEditor in a project ,the main code is:
xaml:
<TextBox x:Name="aaa"/>
<telerik:RadExpressionEditor Grid.Row="1" x:Name="ExpressionEditor"
ExpressionChanged="ExpressionEditor_ExpressionChanged"
ExpressionText="Sin(100)" />
cs:
private void ExpressionEditor_ExpressionChanged(object sender, RadRoutedEventArgs e)
{
try
{
dynamic dynamicExpression = ExpressionEditor.Expression;
dynamic compiledExpression = dynamicExpression.Compile();
object executionResult = compiledExpression();
aaa.Text = executionResult.ToString();
}
catch
{
}
}
the TextBox can show the result,but result preview of the RadExpressionEditor did not show the result,why? what should I do?
by the way,can we improve the RadExpressionEditor to make the programmer can add custorm function or constants like Pi?