This is a migrated thread and some comments may be shown as answers.

[Solved] custom document element type along with custom toolbar icon and dialog ?

1 Answer 101 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pat
Top achievements
Rank 1
Pat asked on 01 Feb 2011, 09:53 PM
I need to provide an editor for users to create custom content but within that content I need to insert custom data.  I don't just want to have them insert a special character sequence that I would parse and replace because without a doubt the special character sequence would be too long and would throw off the design time layout.

I was hoping that I could create/register some type of custom document element class. Then also a custom toolbar icon. User clicks my icon, opens my custom dialog and I prompt for some data. Then I would insert into the document the necessary object/xaml.  It would render a default set of text to the editor so that the user could lay everything out correctly.  BUT this text would be readonly.  The user could either completely delete the whole text or if they set the cursor inside the text, they could click the toolbar icon again to bring up the dialog to edit the data behind the text.

Is this possible? Are there enough custom hooks and api functions to pull this off? Where would I start. I didn't really see anything in the documentation regarding custom toolbars or custom content.

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 04 Feb 2011, 04:44 PM
Hi Pat,

There is currently no extensibility point to allow you to create custom document elements the way you want to. We also do not support read-only regions in the document, so your only option (if the text you want to insert is limited in size) is to insert a TextBlock embedded in an InlineUIContainer containing the text you want to show.
However, we are planning on introducing read-only regions in the next major release, and if all goes according to plan, by mid-March you would be able to implement this use-case easily.
If that does not answer your question, do not hesitate to contact us again.

Greetings,
Iva
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
RichTextBox
Asked by
Pat
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or