Profile Picture

Retrieving the RTF from NRichTextViewWithRibbonControl

Posted By Steven Paplanus 2 Years Ago
Author
Message
Steven Paplanus
Question Posted 2 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 2 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?

Nevron Support
Posted 2 Years Ago
View Quick Profile
Supreme Being

Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)

Group: Forum Members
Last Active: 1 days ago @ 4:40 AM
Posts: 2,879, Visits: 3,044

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



Steven Paplanus
Posted 2 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 2, Visits: 3
Perfect, that worked.  Thank you for you help.



Similar Topics


Reading This Topic