Hi, for weeks I try to transform a ms Access data table with a so called rich text field (witch is actually HTML ) to a rtf format that can be used in a SQLdatabase table and edited in a WPF richtextbox.
I can do it manually by loading my rich text string in a web browser control, copy its content into a Richtextbox, and finaly save the content of the richtextbox.
My Question is now, how to automate this browser Copy -> richtextbox Paste process.
I am trying to use the Clipboard component in WPF and came to this:
public void Convert2()
{
WebBrowser wb = new WebBrowser();
wb.NavigateToString(teststring);
Clipboard.Clear();
Clipboard.SetDataObject(wb);
Clipboard.SetData(DataFormats.Text, (object)wb.Document);
Clipboard.SetDataObject(myrtb);
Clipboard.GetData(DataFormats.Text);
}
(note: myrtb is a rich text box control )
It runs but nothing is copied.
Is there anybody who knows how this WPF CORE clipboard is supposed to work?