I have a XAMLDataProvider that is binding a string property to a RadRichTextBox.
I want to be able to bind the content of the RadRichTextBox to a string (which I have done) and then once a save button is pressed, I need to run some code similar to this.
Essentially I need to be able to bind a property from the ViewModel to RadRichTextBox..... which I am doing with XAML data provider.
Then after a save button is clicked, I take the property which is a string and I need to create a RadDocument from the string that represents that and export that document to a byte[].
Is there an easier and better way to be doing this?
Thanks!
I want to be able to bind the content of the RadRichTextBox to a string (which I have done) and then once a save button is pressed, I need to run some code similar to this.
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider provider = new Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider(); RadDocument document = new RadDocument(string myXAMLString); byte[] output = provider.Export(document);
Essentially I need to be able to bind a property from the ViewModel to RadRichTextBox..... which I am doing with XAML data provider.
Then after a save button is clicked, I take the property which is a string and I need to create a RadDocument from the string that represents that and export that document to a byte[].
Is there an easier and better way to be doing this?
Thanks!