public LaTeXPage() { this.InitializeComponent(); NavigationCacheMode = NavigationCacheMode.Enabled; optWrapText.IsChecked = true; edSrc.TextWrapping = TextWrapping.Wrap; edSrc.IsEnabled = false; StringBuilder sb = new StringBuilder(); sb.AppendLine(@"\begin{equation}"); sb.AppendLine(@"\frac{\partial\psi}{\partial t} = \kappa\mathrm{\nabla}^2\psi \\"); sb.AppendLine(@""); sb.AppendLine(@"\begin{aligned}"); sb.AppendLine(@""); sb.AppendLine(@"x &= r (cos(t) + t sin(t)) \\"); sb.AppendLine(@"y &= r (sin(t) - t cos(t)) \\"); sb.AppendLine(@""); sb.AppendLine(@"\end{aligned}"); sb.AppendLine(@"\end{equation}"); DEFAULT_FORMULAR = sb.ToString(); CURRENT_FORMULAR = DEFAULT_FORMULAR; try { CURRENT_SCALE = Settings.Get("MathScale", CURRENT_SCALE); } catch (Exception) { } var ScaleItems = new ToggleMenuFlyoutItem[] { optScale100, optScale125, optScale133, optScale150, optScale200, optScale250, optScale300, optScale400 }; foreach (var item in ScaleItems) { var scaleName = item.Name.Substring("optScale".Length); if (int.Parse(scaleName) == CURRENT_SCALE) { item.IsChecked = true; } else { item.IsChecked = false; } } try { CURRENT_MATHINPUT = (MATH_INPUT_FORMAT)Enum.Parse(typeof(MATH_INPUT_FORMAT), (string)Settings.Get("MathInput", CURRENT_MATHINPUT.ToString())); } catch (Exception) { } MathView.DefaultBackgroundColor = CURRENT_BGCOLOR; MathView.CanDrag = false; //MathView.CompositeMode = ElementCompositeMode.SourceOver; LoadMathInputFormat(CURRENT_MATHINPUT); }