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

RadRichTextBox Vertical Tab Problem on DocumentVariables

1 Answer 122 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Mert
Top achievements
Rank 1
Mert asked on 15 Sep 2020, 07:22 AM
Hi,

Our application have predefined document variables and we put these variables inside documents. Some of the variables contains singleline text but some of them have multiline text. For multiline text we add \v vertical tab for line break. When we add line break RadRichTextBox UI shows as we expected.
For example we added a text "Progress Telerik\vVertical Tab Test Second Line\vThird Line" and RadRichTextBox UI shows as

Progress Telerik
Vertical Tab Test Second Line
Third Line

But when we exported these xaml file as xaml format, final xaml file is not the same as shown in RadRichTextBox UI. The last line repeated for all the lines. Exported xaml file repeates "Third Line" line as shown below.


<t:Paragraph TextAlignment="Center">
  <t:FieldRangeStart AnnotationID="1">
    <t:DocumentVariableField DateTimeFormatting="" DisplayMode="Result" GeneralFormatting="" NumericFormatting="" VariableName="D_ALICI" />
  </t:FieldRangeStart>
  <t:Span BaselineAlignment="Baseline" FontFamily="Times New Roman" FontSize="16" FontStyle="Normal" FontWeight="Bold" ForeColor="#FF000000" HighlightColor="#00FFFFFF" Strikethrough="False" Text="Third Line" ThemeForeColorShade="" ThemeForeColorTint="" ThemeUnderlineColorShade="" ThemeUnderlineColorTint="" UnderlineColor="#FF000000" UnderlineDecoration="None" />
  <t:Break BreakType="LineBreak" Text="¬" />
  <t:Span BaselineAlignment="Baseline" FontFamily="Times New Roman" FontSize="16" FontStyle="Normal" FontWeight="Bold" ForeColor="#FF000000" HighlightColor="#00FFFFFF" Strikethrough="False" Text="Third Line" ThemeForeColorShade="" ThemeForeColorTint="" ThemeUnderlineColorShade="" ThemeUnderlineColorTint="" UnderlineColor="#FF000000" UnderlineDecoration="None" />
  <t:Break BreakType="LineBreak" Text="¬" />
  <t:Span BaselineAlignment="Baseline" FontFamily="Times New Roman" FontSize="16" FontStyle="Normal" FontWeight="Bold" ForeColor="#FF000000" HighlightColor="#00FFFFFF" Strikethrough="False" Text="Third Line" ThemeForeColorShade="" ThemeForeColorTint="" ThemeUnderlineColorShade="" ThemeUnderlineColorTint="" UnderlineColor="#FF000000" UnderlineDecoration="None" />
  <t:FieldRangeEnd AnnotationID="1" />
</t:Paragraph>


How can we solve this problem?

You can download sample application and final xaml file from  https://we.tl/t-KYQh8XpGfF

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 16 Sep 2020, 09:36 AM

Hi Mert,

Thank you for the provided feedback and sample application.

I successfully reproduce the described behavior. It is related to reusing the same span when iterating all the lines. I logged an item in our backlog to fix this issue: RichTextBox: Calling a ChangeAllFieldsDisplayMode(FieldDisplayMode.Result) on a document containing a multiline document variable leads to wrongly updated span box text. I am afraid I cannot provide you with a workaround until this bug is fixed, so please, make sure you are following the item using the Follow button so you can receive updates when its status changes.

In appreciation for bringing this to our attention, I updated your Telerik points.

Regards,
Martin
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
RichTextBox
Asked by
Mert
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or