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

[Solved] Customized XAML doesn't work in RTB

3 Answers 81 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.
Vishal
Top achievements
Rank 1
Vishal asked on 03 Oct 2011, 02:22 PM
I inserted a namespace xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml in the XAML of Rad document and used x:Name="Test" attribute in some of the elements. But after I load this customized XAML inside Rad RTB, it strips off the namespace as well as the x:name attributes from all the places. Is there any way I can retain my custom changes?

3 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 04 Oct 2011, 04:37 PM
Hello Vishal,

Custom properties cannot be persisted with XamlFormatProvider, as it is only concerned with preserving the content of the document and the properties of the document elements in RadDocument's model.
The only way to persist custom data is using annotations (like Bookmarks) in the document. Could you elaborate a little on your scenario and the custom attributes you wish to persist, so that we can suggest a different approach.

Best wishes,
Iva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Vishal
Top achievements
Rank 1
answered on 05 Oct 2011, 05:28 AM
Hi Iva

Thanks for reply.

I want to place multiple table in document and want to give identifier to each table. So that I should be able to identify table by using its identifier. i.e. <telerik:table x:Name="TestTable"></telerik:table>


Thanks
Vishal


 
0
Iva Toteva
Telerik team
answered on 07 Oct 2011, 05:47 PM
Hello Vishal,

In your scenario, you can use Bookmarks and place a bookmark in the first cell of each table. By default, bookmarks are not shown unless you set the ShowBookmarks property of RadDocument to True.
In that way, you will not only be able to identify each table, but will also have convenient methods to navigate to each Bookmark and respectively, the table it is in.

All the best,
Iva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
Vishal
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Vishal
Top achievements
Rank 1
Share this question
or