I want to create a small math solver application in wpf or silverlight that shows working. Something similiar to what Microsoft Math can do. How do I get those graphics such as the brackets with the ability to stretch vertically based on how many rows are in the equation?
Are there any library that contain these graphics and displaying the steps for .net?
Based on @duffymo's answer, you could load a webbrowser WPF Webbrowser and inject the MathJAX library
For reference:
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<WebBrowser x:Name="Browser" />
</Grid>
You can interact with the JavaScript API using this code:
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
Browser.LoadCompleted += BrowserOnLoadCompleted;
Browser.Navigate(new Uri("http://example.com"));
}
private void BrowserOnLoadCompleted(object sender, NavigationEventArgs navigationEventArgs)
{
var doc = (HTMLDocument)Browser.Document;
var head = doc.getElementsByTagName("head").Cast<HTMLHeadElement>().First();
var script = (IHTMLScriptElement)doc.createElement("script");
script.text = "alert('hi');";
head.appendChild((IHTMLDOMNode)script);
script.text = "alert('bye');";
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With