Пример #1
0
        private void RichText(object sender, EventArgs e)
        {
            var rtf = new Rtf.Builder();

            rtf.TextStyle = new Rtf.TextStyle
            {
                FontIndex       = rtf.FontIndex(Rtf.FontDesc.CourierNew),
                FontStyle       = Rtf.EFontStyle.Bold | Rtf.EFontStyle.Underline,
                ForeColourIndex = rtf.ColourIndex(Color.Red),
                BackColourIndex = rtf.ColourIndex(Color.Green),
                FontSize        = 18,
            };
            rtf.Append("Heading\n");
            rtf.TextStyle = Rtf.TextStyle.Default;
            rtf.Append("More Rtf text");

            var content = rtf.ToString();

            Rylogic.Gui.WinForms.HelpUI.ShowDialog(this, Rylogic.Gui.WinForms.HelpUI.EContent.Rtf, "RTF Help", content);
        }