/// <summary> /// Render the provided markdown text in the window. /// </summary> /// <param name="markdownText">MarkDown text to display</param> public void DisplayMarkdown(string markdownText) { this.markdownText = markdownText; string htmlToRender = Markdig.Markdown.ToHtml(markdownText); htmlToRender = "<style>h1 { font-family: verdana;font-size: 130%;}h2 { font-family: verdana;font-size: 120%;}h3 { font-family: verdana;font-size: 110%;}h4 { font-family: verdana;font-size: 100%;}h5 { font-family: verdana;font-size: 100%;}h6 { font-family: verdana;font-size: 100%;}p { font-family: verdana;font-size: 85%;}li { font-family: verdana;font-size: 85%;}</style>" + htmlToRender; if (!string.IsNullOrWhiteSpace(htmlToRender)) { MarkdownBrowserView.NavigateToString(htmlToRender); } }
/// <summary> /// Clears out the control when there is no text to display. /// </summary> public void ClearMarkdown() { MarkdownBrowserView.NavigateToString("<br/>"); }