Hi, I'm using RadRichTextBoxRibbonUI to setup a document editor. In runtime when trying to change a paragraph's properties like Indention and Spacing through the default UI dialog, the corresponding boxes don't show current values and new values can't be entered. The up-down numeric boxes for right and left indention and for before and after paragraph spacing seem to be not bound to these properties of the paragraph. Other controls in the dialog window like the background color, alignment and line spacing comboboxes are working. Only RadNumericUpDown controls have a problem.
Can you please advise what could be missing for the Paragraph properties dialog to work as expected or point me to a tutorial for correctly setting up a document editor?
11 Answers, 1 is accepted
For quick start, you can use the TelerikEditor example in our examples GitHub repo. Some description is also available in the Using RadRichTextBoxRibbonUI help article.
Regards,
Boby
Progress Telerik
We are unaware of such an issue. I just tried to reproduce it in a simple application but to no avail. It is hard to guess what might be causing this unwanted behavior. Could you share a sample runnable copy of the app reproducing the issue. As this is a forum thread attaching projects are not allowed but you could upload the sample app to a files storage web site and share the link here.
Regards,
Peshito
Progress Telerik
Hi Pesho,
The problem in my case appears to be in a style which is applied to the RadNumericUpDown controls. It's a globally defined style that gets applied implicitly to RichTextBox editor dialogs. So the fix should be ether fix the style or avoid applying it to the controls. I prefer the second option because the implicit style is used in many places and it's not my code to change, but I don't know how to avoid applying this style to the UpDown controls in the dialogs.
Please find here: https://1drv.ms/u/s!AtR3NClxPgbdx0JtudpglPaVSa0j the style which breaks the RadNumericUpDown controls in the dialogs, and a runnable app to demonstrate the unwanted behavior (it's the Telerik's sample rich textbox editor with applied styles from the App.xaml file).
Thank you for elaborating on the issue. You can overwrite the implicit style that is used globally in your application by using custom ParagraphProperties dialog. Please refer to the CustomParagraphPropertiesDialog SDK sample where you can see how to use it.
Regards,
Peshito
Progress Telerik
You are welcome! I tried to reproduce the issue. I guess you are hitting it because the empty implicit style is applied directly to the CustomParagraphPropertiesDialog. Simply apply it to the RadNumericUpDown and it should work. Add the following code in the CustomParagraphPropertiesDialog.xaml:
<
dialogs:RadRichTextBoxWindow.Resources
>
<
Style
TargetType
=
"{x:Type telerik:RadNumericUpDown}"
>
</
Style
>
</
dialogs:RadRichTextBoxWindow.Resources
>
Regards,
Peshito
Progress Telerik
Hi,
The idea is to apply a theme to the window with RadRichTextBox and Ribbon UI, including the dialogs like ParagraphProperties custom dialog. The code you've given is already in place in CustomParagraphPropertiesDialog.xaml, but when I put:
StyleManager.ApplicationTheme = new Windows8Theme();
in MainWindow or CustomParagraphPropertiesDialog constructor, the RadNumericUpDown controls inside the CustomParagraphPropertiesDialog window are not visible (see attached image), with or without the definition of the empty implicit style.
Thanks for the additional information. We managed to reproduce the problem and will further investigate it. I will let you know here when we have more information on the matter.
Regards,
Boby
Progress Telerik
We've managed to pinpoint the issue, and it's in the sample implementation of the custom dialog. You could fix it yourself by changing the following line:
public
static
readonly
DependencyProperty NumericWidthProperty =
DependencyProperty.Register(
"NumericWidth"
,
typeof
(
double
),
typeof
(RadParagraphPropertiesDialog),
null
);
to
public
static
readonly
DependencyProperty NumericWidthProperty =
DependencyProperty.Register(
"NumericWidth"
,
typeof
(
double
),
typeof
(CustomParagraphPropertiesDialog),
null
);
We will additionally push this update to the GitHub repo soon.
We have added Telerik points to your account for the report. Don't hesitate to contact us if you have other questions.
Regards,
Boby
Progress Telerik
Thank you,
I made the change and can confirm that the issue is fixed...!
Best Regards,
George