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

Default Paragraph proporties dialog problem

11 Answers 162 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 09 Nov 2017, 02:09 PM

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

Sort by
0
Boby
Telerik team
answered on 10 Nov 2017, 03:09 PM
Hello George,

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
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Georgi
Top achievements
Rank 1
answered on 20 May 2018, 06:59 PM
Hi, did you manage to fix this problem? Currently I have exactly the same issue with the paragraph options dialog and Telerik's example works but my editor doesn't... I don't see any difference in references or the code...
0
Peshito
Telerik team
answered on 23 May 2018, 09:59 AM
Hi Georgi,

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
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
George
Top achievements
Rank 1
answered on 23 May 2018, 01:07 PM

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).

0
Peshito
Telerik team
answered on 25 May 2018, 12:51 PM
Hello Georgi,

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
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
George
Top achievements
Rank 1
answered on 25 May 2018, 02:02 PM
Thank you for the advise, I already did that but now I have another problem... I use custom ParagraphProperties dialog with defined empty implicit style for RadNumericUpDown controls, to override the global implicit style, but now if I set a theme in CustomParagraphPropertiesDialog constructor: StyleManager.ApplicationTheme = new Windows8Theme(); the NumericUpDown controls are not visible in the dialog. Can you try to reproduce that - set theme using StyleManager in your sample project and check the ParagraphProperties dialog?
0
Peshito
Telerik team
answered on 30 May 2018, 10:00 AM
Hello George,

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>
This will overwrite the global style by setting empty style to all RadNumericUpDown controls inside the CustomParagraphPropertiesDialog window.

Regards,
Peshito
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
George
Top achievements
Rank 1
answered on 30 May 2018, 11:43 AM

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.

 

0
Boby
Telerik team
answered on 04 Jun 2018, 10:59 AM
Hi George,

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
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Accepted
Boby
Telerik team
answered on 04 Jun 2018, 12:41 PM
Hello George,

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
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
George
Top achievements
Rank 1
answered on 04 Jun 2018, 01:41 PM

Thank you,

I made the change and can confirm that the issue is fixed...!

 

Best Regards,

George

Tags
RichTextBox
Asked by
George
Top achievements
Rank 1
Answers by
Boby
Telerik team
Georgi
Top achievements
Rank 1
Peshito
Telerik team
George
Top achievements
Rank 1
Share this question
or