protected void UpdateText() { var text = Text ?? ""; HelpTextBox.ResetFont(); var rtf = ConvertSimpleMarkdownToRtf(text); HelpTextBox.Rtf = rtf; var size = TextRenderer.MeasureText(HelpTextBox.Text, HelpTextBox.Font, HelpTextBox.Size, TextFormatFlags.TextBoxControl | TextFormatFlags.WordBreak); Height = size.Height + HelpTextBox.Margin.Vertical + HelpTextBox.Lines.Length * 5; }
private void UpdateHelp() { var help = ""; if (ToolManager.ActiveTool != null) { help = ToolManager.ActiveTool.GetContextualHelp(); } HelpTextBox.ResetFont(); var rtf = ConvertSimpleMarkdownToRtf(help); HelpTextBox.Rtf = rtf; var size = TextRenderer.MeasureText(HelpTextBox.Text, HelpTextBox.Font, HelpTextBox.Size, TextFormatFlags.TextBoxControl | TextFormatFlags.WordBreak); Height = size.Height + HelpTextBox.Margin.Vertical + HelpTextBox.Lines.Length * 5; }