I am saving the XAML for a RadDocument in a database. I would like to replace certain text with inlineUIElements. I am able to find the text and add the elements (textboxes), but when I try to set the old span text to an empty string the Text property remains unchanged.
I have also tried to remove the Span from the Paragraph, but this gives a not implemented error:
I also tried creating a new RadDocument by iterating through sections, paragraphs, and spans. For the span including the substitution I tried to write the new elements, and for the others to just copy the old elements. The Style didn't seem to come through. The following is the sample that I am working with, and incidentally, the first apostrophe does not work, while the second does.
Is this possible to do, and if so, what is the correct method?
Thank you,
Jennifer
tempSpan.Text = "";
I have also tried to remove the Span from the Paragraph, but this gives a not implemented error:
tempPara.Children.Remove(tempSpan)
I also tried creating a new RadDocument by iterating through sections, paragraphs, and spans. For the span including the substitution I tried to write the new elements, and for the others to just copy the old elements. The Style didn't seem to come through. The following is the sample that I am working with, and incidentally, the first apostrophe does not work, while the second does.
<
t:RadDocument
version
=
"1.0"
LayoutMode
=
"Flow"
PageViewMargin
=
"0,0"
DefaultPageLayoutSettings
=
"800,1140"
ParagraphDefaultSpacingAfter
=
"0"
SectionDefaultPageMargin
=
"6,6,6,6"
xmlns:t
=
"clr-namespace:Telerik.Windows.Documents.Model;assembly=Telerik.Windows.Documents"
xmlns
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<
t:Section
PageMargin
=
"6,6,6,6"
>
<
t:Paragraph
SpacingAfter
=
"0"
>
<
t:Span
Text
=
" This is a "
FontFamily
=
"Verdana"
></
t:Span
>
<
t:Span
Text
=
"test"
FontFamily
=
"Verdana"
UnderlineDecoration
=
"Line"
ForeColor
=
"#FFFF0000"
HighlightColor
=
"#FFFFFF00"
></
t:Span
>
<
t:Span
Text
=
"."
FontFamily
=
"Verdana"
ForeColor
=
"#FFFF0000"
HighlightColor
=
"#FFFFFF00"
></
t:Span
>
</
t:Paragraph
>
<
t:Paragraph
SpacingAfter
=
"0"
></
t:Paragraph
>
<
t:Paragraph
SpacingAfter
=
"0"
>
<
t:Span
Text
=
"And "
FontFamily
=
"Verdana"
></
t:Span
>
<
t:Span
Text
=
"another"
FontFamily
=
"Verdana"
FontWeight
=
"Bold"
></
t:Span
>
<
t:Span
Text
=
"."
FontFamily
=
"Verdana"
></
t:Span
>
</
t:Paragraph
>
<
t:Paragraph
SpacingAfter
=
"0"
></
t:Paragraph
>
<
t:Paragraph
SpacingAfter
=
"0"
>
<
t:Span
Text
=
"A third."
FontFamily
=
"Verdana"
></
t:Span
>
</
t:Paragraph
>
<
t:Paragraph
SpacingAfter
=
"0"
></
t:Paragraph
>
<
t:Paragraph
SpacingAfter
=
"0"
>
<
t:Span
Text
=
"I wonder what would happen here |{60C5C54E-0230-DE11-A1B0-0003FF4E47B3}| if this got so terribly long. Don't know. Let's find out if this works."
FontFamily
=
"Verdana"
></
t:Span
>
</
t:Paragraph
>
</
t:Section
>
</
t:RadDocument
>
Is this possible to do, and if so, what is the correct method?
Thank you,
Jennifer