Default Paragraph proporties dialog problem

12 posts, 1 answers
  1. George
    George avatar
    8 posts
    Member since:
    Oct 2017

    Posted 09 Nov 2017 Link to this post

    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?

  2. Boby
    Admin
    Boby avatar
    690 posts

    Posted 10 Nov 2017 Link to this post

    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.
  3. Georgi
    Georgi avatar
    7 posts
    Member since:
    Nov 2008

    Posted 20 May in reply to George Link to this post

    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...
  4. Peshito
    Admin
    Peshito avatar
    550 posts

    Posted 23 May Link to this post

    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.
  5. George
    George avatar
    8 posts
    Member since:
    Oct 2017

    Posted 23 May in reply to Peshito Link to this post

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

  6. Peshito
    Admin
    Peshito avatar
    550 posts

    Posted 25 May Link to this post

    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.
  7. George
    George avatar
    8 posts
    Member since:
    Oct 2017

    Posted 25 May in reply to Peshito Link to this post

    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?
  8. Peshito
    Admin
    Peshito avatar
    550 posts

    Posted 30 May Link to this post

    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.
  9. George
    George avatar
    8 posts
    Member since:
    Oct 2017

    Posted 30 May in reply to Peshito Link to this post

    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.

     

  10. Boby
    Admin
    Boby avatar
    690 posts

    Posted 04 Jun Link to this post

    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.
  11. Answer
    Boby
    Admin
    Boby avatar
    690 posts

    Posted 04 Jun Link to this post

    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.
  12. George
    George avatar
    8 posts
    Member since:
    Oct 2017

    Posted 04 Jun in reply to Boby Link to this post

    Thank you,

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

     

    Best Regards,

    George

Back to Top