Tag Archives: equations

Recursively draw equations in C#

The basic idea for recursively drawing equations is simple. Well, sort of simple. Classes represent different kinds of equations. A particular class knows how to draw its kind of equation. It uses other classes to draw its pieces. For example, … Continue reading

Posted in algorithms, drawing, fonts, graphics, recursion | Tagged , , , , , , , , , , , | 2 Comments

Use WPF code to display subscripts and superscripts in C#

In the post Display subscripts and superscripts in a WPF TextBlock in C# I mentioned that you could make subscripts and superscripts in WPF code but it was easier in XAML code. Juan Manuel Montes asked for an example, so … Continue reading

Posted in fonts, formatting, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

Display subscripts and superscripts in a WPF TextBlock in C#

The following examples show how to display subscripts and superscripts in a RichTextBox in a Windows Forms program. Easily display subscripts and superscripts in a RichTextBox in C# Display subscripts and superscripts in a RichTextBox in C# In a WPF … Continue reading

Posted in fonts, formatting, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , | 1 Comment

Easily display subscripts and superscripts in a RichTextBox in C#

The example Display subscripts and superscripts in a RichTextBox in C# requires you to make arrays holding the positions of the characters that should be subscripts and superscripts. That’s not a big deal but it does require you to count … Continue reading

Posted in fonts, formatting | Tagged , , , , , , , , , , , , , , , | 1 Comment

Display subscripts and superscripts in a RichTextBox in C#

A TextBox can only use a single font at a time so it can’t display subscripts and superscripts, but a RichTextBox can do it. Simply use the control’s Select method to select the text that should be a subscript or … Continue reading

Posted in fonts, formatting | Tagged , , , , , , , , , , , , , | 1 Comment