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

Text horizontal alignment problem

11 Answers 163 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 28 Mar 2011, 08:14 AM
Hi.
In the new release I found some problem with the text horizontal alignment.
For example, when I add paragraph with some right-aligned text it looks left-aligned:
(If there are two or more paragraphs, the text is aligned with the right side of longest text)

_textBox.Document = _xamlFormatProvider.Import(@"
<t:RadDocument xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:t=""clr-namespace:Telerik.Windows.Documents.Model;assembly=Telerik.Windows.Documents"" version=""1.1"" LayoutMode=""Flow"" PageViewMargin=""0,0"" ParagraphDefaultSpacingAfter=""0"" SectionDefaultPageMargin=""0,0,0,0"">
  <t:Section>
    <t:Paragraph TextAlignment=""Right"">
      <t:Span FontSize=""16"" Text=""Some text"" />
    </t:Paragraph>
  </t:Section>
</t:RadDocument>
");

11 Answers, 1 is accepted

Sort by
0
Ivailo Karamanolev
Telerik team
answered on 29 Mar 2011, 05:18 PM
Hi Alexander,

Unfortunately, this is a known issue with the Q1 release. We're working on it as we speak and, hopefully, it will be officially available in Q1 SP1 if not in a LIB before that. We're sorry for any inconvenience caused.

All the best,
Ivailo
the Telerik team
0
Vic
Top achievements
Rank 2
answered on 21 Apr 2011, 01:41 PM
I noticed that it still isn't corrected in 2011 Q1 SP1, we are also using the XAML data provider.

Thanks,
Vic
0
Iva Toteva
Telerik team
answered on 21 Apr 2011, 03:41 PM
Hi Vic,

Actually, we believe that the issue was fixed in the service pack. You can test it in the updated Data-Binding Demo.
If the problem persists, we would greatly appreciate it if you could elaborate a bit more on your implementation and the behavior you are observing.

Best wishes,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vic
Top achievements
Rank 2
answered on 21 Apr 2011, 04:06 PM
The issue I am referring to exists in the demo. Please try to horizontally align text (centered) within a table cell, the settings persist but the actual text alignment doesn't do anything.

Update: I tried this again in the http://demos.telerik.com/silverlight/#RichTextBox/MSWord demo and it works, seems like this might be a binding issue.

I also found that running the demo in IE9 causes some exceptions (attached) I was able to run it in Google Chrome.

Thanks,
Vic
0
Iva Toteva
Telerik team
answered on 21 Apr 2011, 05:03 PM
Hello Vic,

The exception you are getting is due to the fact that the demo was updated and the browser has a previous version stored in the cache, preventing it from downloading the new version. Emptying the cache should solve the issue and allow you to review the latest demo. Perhaps that was the reason why the alignment glitch seemed to be present when you tested it the first time.
If you notice anything else, do not hesitate to get back to us.

All the best,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vic
Top achievements
Rank 2
answered on 21 Apr 2011, 05:26 PM
Hello Iva,

Cleared the cache in IE9 and now it displays an "Initialization Failed" dialog, cleared ISO as well.

My original test was in Google Chrome and the issue still exists.

Tried the same in IE8, no errors loading the demo though the alignment problem still exists and again only in the binding demo.

Repro: I would insert a 6x6 table add text in 3 cells then try to center/right/left align, doesn't work. The bound data is refreshed but the data in the RichTextBox doesn't reflect the change.

Please let me know

Working:
http://demos.telerik.com/silverlight/#RichTextBox/MSWord

Not working:
http://demos.telerik.com/silverlight/#RichTextBox/Binding

Thanks

0
Boby
Telerik team
answered on 26 Apr 2011, 05:37 PM
Hi Vic,

We were unable to reproduce aligning issue using your steps in IE nor  in Chrome. I continue to believe that both of the problems are caused by cached older versions of assemblies.
One of the best way to test if caching is the problem is to start our demo project in InPrivate browsing mode (Incognito in Google Chrome). Thus we will eliminate all uncertainties about not clearing cache properly.
If you continue to experience problems, you could open a support ticket and send us simple project that reproduces them, so we can investigate them further. 

Greetings,
Boby
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vic
Top achievements
Rank 2
answered on 26 Apr 2011, 10:35 PM
Hi Boby,

I ran the case by our QA team, the results were the same as mine.

Could you please have another look, if you find that you cannot reproduce this I will try to upload a video of my experience.

The difference is that it works in the MSWord demo and not in the binding demo, we use binding.

Thanks again
0
Iva Toteva
Telerik team
answered on 29 Apr 2011, 05:10 PM
Hi Vic,

Thank you for your persistence. We managed to reproduce the issue. The problem is not related to data-binding, but the layout mode of the document - the ParagraphAlignment and CellContentAlignmenr are properly respected only in PagedLayoutMode (the default layout mode of the MS Word demo) and not in FlowLayoutMode (the data-binding demo).
We will fix the issue. The Telerik points in your account has been updated in appreciation for the bug report.

Regards,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Anthony
Top achievements
Rank 1
answered on 04 Aug 2015, 11:37 AM
I am finding it iimpossible to align left although the first line start was ok.  When I centred my e-mail address I could not escape to the central alignment.  Very difficult to write with only half page available - big problem.
0
Tanya
Telerik team
answered on 07 Aug 2015, 08:36 AM
Hello Anthony,

The issue discussed in this thread is already fixed and I have troubles understanding your scenario. Could you share more information? Are you trying to align a text in a paragraph or something else? How does your document look like?

Regards,
Tanya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Alexander
Top achievements
Rank 1
Answers by
Ivailo Karamanolev
Telerik team
Vic
Top achievements
Rank 2
Iva Toteva
Telerik team
Boby
Telerik team
Anthony
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or