예제 #1
0
        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;
        }
예제 #2
0
        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;
        }