Anfügen von text und Bild in die RichTextBox

Append Text

private void AddText(string text)
{
    string[] str = text.Split(new string[] { ";" },
        StringSplitOptions.RemoveEmptyEntries);

    if (str.Length == 2)
    {
        richTextBox1.DeselectAll();
        richTextBox1.SelectionFont = new Font(richTextBox1.SelectionFont, FontStyle.Bold);
        richTextBox1.AppendText(Environment.NewLine + str[0] + ";");
        richTextBox1.SelectionFont = new Font(richTextBox1.SelectionFont, FontStyle.Regular);
        richTextBox1.AppendText(str[1]);
    }
}

Für Append Bild

Image image = Image.FromFile("Logo.jpg");

//Put the image on the clipboard
Clipboard.SetImage(image);

////Paste it into the rich tetx box.
richTextBox1.Paste();

Weiß ich nicht, wie kann erstellen RichTextBox-wie Dieses Bild?
Anfügen von text und Bild in die RichTextBox

Schreibe einen Kommentar