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

RadRichTextBox always horizontally align center when change RtfDataProviderEditor.Rtf property

4 Answers 107 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Davut
Top achievements
Rank 1
Davut asked on 12 Sep 2011, 04:17 PM
Hello,
Problem is my RadRichTextBox object(editor variable here) always align my content horizontally center. I'm using 2011 Q2 Release.

Depending on my design I need to get data from a rtf resource(db[binary] and file resources).
Sure, I can bind RtfDataProvider instance's RTF property but even this didn't solve my problem.(Beside this I don't want to bind it to an element for some purposes. )
Here is my code,

XAML
<
telerikDocumentsRTF:RtfDataProvider x:Name="RtfDataProviderEditor"  RichTextBox="{Binding ElementName=editor}" />


<telerik:RadRichTextBox  Grid.Row="1" x:Name="editor" MinHeight="150"  Margin="24 24 0 0" >

Code Behind
RtfDataProviderEditor.Rtf = (new UnicodeEncoding()).GetString(rtf, 0, rtf.Length);

On codebehind right side is what I read from resource and what I want to read. Its Ok!
But when this line passed RtfDataProviderEditor.Rtf property change from somewhere and another Rtf content become replaced my content's centered one.

  My content is a simple report has some left and centr aligned paragraphs. I cannot attach it depending on forum restrictions. But here it is http://www.datasel.com.tr/rapor.rtf

----
Today I realize that If first line is centered this bug appears. Right?

King Regards!

4 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 15 Sep 2011, 11:46 AM
Hi Davut,

Thank you for reporting this issue. The problem is indeed with paragraphs that come after a centered paragraph, but it is also specific to the way the document has been exported. (For example, if you open the document in Word and save it anew, it will be properly imported.)
Nonetheless, we will take the matter into consideration and try to fix it in an internal build soon.

Regards,
Iva
the Telerik team

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

0
Davut
Top achievements
Rank 1
answered on 15 Sep 2011, 12:20 PM
Thanks you for response Iva,
I would like to report similar issues,

In Addition a in a Turkish ASCII file if there is a  \fcharset1 sentence before font name (here before Arial) Turkish characters turn undisplayable chars. When you open the file in a WordPad then save again ms word correct it.
In fact ms office removes non used characters , here blue,green expressions are irrelevant so ms word removes them also.

So we need a validator.

One more thin I notice the spellchecker toggle button. I set it's IsChecked property false from XAML or codebehind but no effect. It's always Checked when the compoenent loaded.

Even the spellcheck toggleButton isChecked Propery false on XAML I see true on propery pane.

Sincerely Yours,

{\rtf1\ansi\ansicpg1254\uc1\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil\fcharset1
 
Arial;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;
 
\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;
 
\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
 
\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
 
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;
 
\red128\green128\blue128;\red192\green192\blue192;
 
\red166\green202\blue240;\red255\green255\blue128;}
 
\uc1
\pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs24 Klinik Bilgi:
\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 
\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs24 Sol b\'f6brek 87 x 38
 
mm, sa\'f0 b\'f6brek 125 x\plain \f0\fs24  60 mm boyutlar\'fdndad\'fdr.\plain
 
\f0\fs24  Sa\'f0 b\'f6brek parankim kal\'fdnl\'fd\'f0\'fd do\'f0ald\'fdr. Sol b
 
\'f6brek parankim kal\'fdnl\'fd\'f0\'fd en ince yerinde 6 mm \'f6l\'e7\'fclm\'fc
 
\'fe olup incelmi\'fetir. Sa\'f0 b\'f6brek \'fcst polde 45 x 55 mm boyutunda
 
egzofitik yerle\'feimli\plain \f0\fs24  kortikal kist ile uyumlu hipodens
 
lezyon izlenmi\'fetir sol b\'f6brek alt pol toplay\'fdc\'fd sisteminde 11 mm
 
boyutunda ta\'fe izlendi her iki b\'f6brek toplay\'fdc\'fd sistemi do\'f0ald\'fdr.
\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs24 \'ac
\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0
\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \par}
0
Accepted
Iva Toteva
Telerik team
answered on 21 Sep 2011, 08:42 AM
Hello Davut,

Thank you for the follow-up. We will look into these specific cases and adjust the import if a revision is necessary.

As for the button in RadRichTextBoxRibbonUI which toggles spell checking, it is bound to the ToggleSpellChecking command of RadRichTextBox. Therefore, it updates its state to match the value of the IsSpellCheckingEnabled property of RadRichTextBox. If you wish to have spell checking disabled the first time the editor is shown, you can just set it to False and the changes will be visible in the state of the button.

Regards,
Iva
the Telerik team

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

0
Davut
Top achievements
Rank 1
answered on 21 Sep 2011, 10:07 AM
Thank you ,
Yes disabling ReachTextBox SpellChecking property worked for me. Looks better now.
Regards!
Tags
RichTextBox
Asked by
Davut
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Davut
Top achievements
Rank 1
Share this question
or