I am trying to use RichEdit for commenting something.
So the user enter some text, i save it to the base as xaml string (link), but then i want to show it in xaml, and that's the problem.
I write:
But the user can edit text. I know that i can set read only to true, but the user can still focus RadRichTextBox.
I just want to show text that user enter it when commenting. (with formating of course)
So the user enter some text, i save it to the base as xaml string (link), but then i want to show it in xaml, and that's the problem.
I write:
string text = "<t:RadDocument xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:t=\"clr-namespace:Telerik.Windows.Documents.Model;assembly=Telerik.Windows.Documents\" ParagraphDefaultSpacingBefore=\"0\" SectionDefaultPageMargin=\"10,10,10,10\" PageViewMargin=\"10,10\" LayoutMode=\"Flow\"><t:Section PageMargin=\"10,10,10,10\"><t:Paragraph SpacingAfter=\"12\"><t:Span Text=\"This is a test.\" FontFamily=\"Verdana\" /></t:Paragraph></t:Section></t:RadDocument>"; |
RadRichTextBox rich = new RadRichTextBox(); |
rich.Document = XamlReader.Load(text) as <RadDocument>(); |
xamlPlaceHolder.Child = rich; |
I just want to show text that user enter it when commenting. (with formating of course)