Group: Forum Members
Last Active: 6 Years Ago
Posts: 2,
Visits: 3
|
I have a project where I need to save and load data from a Winforms app to a database, where a documentation form was built with the NRichTextViewWithRibbonControl that would be saved with the rest of the project information I need to persist. I have been looking for a while, but can't seem to find a way to either send/retrieve or stream the RTF data from the control. Is there any way to make this work?
|
Group: Forum Members
Last Active: Last Week
Posts: 3,054,
Visits: 4,000
|
Hi Steven, All WPF / Winform controls in NOV are actually NOV hosts that wrap a certain NOV Widget. This Widget is exposed from the typed Widget property of the control. In the case of the "NRichTextViewWithRibbon" control this Widget is of type NRichTextViewWithRibbon. This widget in turn contains View and Ribbon properties that expose the functionality of the ribbon and the rich text view. So back to your question in oder to load / save content from the view you need to write something like:
nRichTextViewWithRibbonControl1.Widget.View.LoadFromFile("c:\\temp\\test.rtf");
You can also import rtf/docx etc. from in memory streams (this is the case when you read the content from a database for example): nRichTextViewWithRibbonControl1.Widget.View.LoadFromStream(someStream, new NRtfTextFormat());
Hope this helps - let us know if you meet any problems or have any questions.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 6 Years Ago
Posts: 2,
Visits: 3
|
Perfect, that worked. Thank you for you help.
|