This question is locked. New answers and comments are not allowed.
Hello All
I am new to RichTextBox and love the component but I am having difficulty finding out if I can perform the actions described below. I need some pointers.
We want to create a dynamic document from a database of 'parts' provided by RIA services.
i.e. pseudo code to 'build' document
The idea is that the document is readonly, with a context menu to edit the part if the user is an Author.
When the user clicks on the 'part' I want to put a border around or highlight that part only with a context menu available for the user to click if they have rights to edit it. Inline editing is not essential as the content of that 'part' will be edited in a new window. Once edited, that part will be pushed back as XAML to the database and the changes should be updated on screen through two-way databinding.
As there are likely to be in excess of 500 of 'parts' or more, is a single RadRichTextBox control going to be efficient enough? Most of the parts will just contain text with simple formating although a few might contain images. I thought I could use a virturalisation panel of sorts and have multiple RichTextBox's loading for each part, but from other forum posts, this seems to be an inefficient option.
So, can anyone give me any pointers to get me started to acheive this? We previously solved this with a RadGridView and data virtualisation, RadGridView is very efficient in this respect, but, once we styled the rows in the grid, because the row heights were vastly different for each part, we were not easily able to 'scroll-into-view' the part just added or editied due to row height averaging.
I am thinking that RadRichTextBox will overcome this by building the document in the viewmodel before rendering the 'parts'; and then we can move to the part using a bookmark, simulating the 'scroll-into-view'? Just a thought. Any ideas from seasoned RichTextBox users welcomed!
Thanks
Mark.
I am new to RichTextBox and love the component but I am having difficulty finding out if I can perform the actions described below. I need some pointers.
We want to create a dynamic document from a database of 'parts' provided by RIA services.
i.e. pseudo code to 'build' document
foreach( DocPart p in context.document.parts) {
XAML PartToAdd = p.content.XAML;
Bool isEditable = (this.user.userlevel == USER_AUTHOR);
RichTextBox ... ( AddPart...
BookmarkStart(p.id)
<SomeWrapper "isEditable = {Binding "isEditable}">
PartToAdd XAML content
</SomeWrapper>
BookmarkEnd(p.id)
);
} The idea is that the document is readonly, with a context menu to edit the part if the user is an Author.
When the user clicks on the 'part' I want to put a border around or highlight that part only with a context menu available for the user to click if they have rights to edit it. Inline editing is not essential as the content of that 'part' will be edited in a new window. Once edited, that part will be pushed back as XAML to the database and the changes should be updated on screen through two-way databinding.
As there are likely to be in excess of 500 of 'parts' or more, is a single RadRichTextBox control going to be efficient enough? Most of the parts will just contain text with simple formating although a few might contain images. I thought I could use a virturalisation panel of sorts and have multiple RichTextBox's loading for each part, but from other forum posts, this seems to be an inefficient option.
So, can anyone give me any pointers to get me started to acheive this? We previously solved this with a RadGridView and data virtualisation, RadGridView is very efficient in this respect, but, once we styled the rows in the grid, because the row heights were vastly different for each part, we were not easily able to 'scroll-into-view' the part just added or editied due to row height averaging.
I am thinking that RadRichTextBox will overcome this by building the document in the viewmodel before rendering the 'parts'; and then we can move to the part using a bookmark, simulating the 'scroll-into-view'? Just a thought. Any ideas from seasoned RichTextBox users welcomed!
Thanks
Mark.