The reason I asked is because you mentioned
ExpressionTextBox as if it were a type, and it's part of WWF and not appropriate for your use-case. You probably used it as an identifier for your
TextBox though.
Forget the user interface. The challenge here is to parse a
string as a mathematical expression and then evaluating it. There are probably libraries out there that can do this for you, but if your expressions only contain the basic arithmetic operators and trigonometric functions, with some guidance you can easily write your own parser.
First you need to create a model that can represent a mathematical expression. You need classes that represent the following concepts: binary operations, unary operations, function calls, floating point literals. Let all of them implement an interface that represents a mathematical expression. Here is an example:
Now, if you want to go down this road, try to create classes that represent functions and unary operators, and then I will go on to explain how you can parse them from strings.