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

Missing Example - CustomStyleFormattingPropertiesDialog ?

6 Answers 46 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Veteran
Michael asked on 12 Oct 2017, 02:21 AM

Hi there,

I've found the examples for all the other CustomxDialog types, but I haven't found one for CustomStyleFormattingPropertiesDialog

Can somebody give a little guidance?

6 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 16 Oct 2017, 02:02 PM
Hi Michael,

The StyleFormattingPropertiesDialog is one of the complex dialogs in RadRichTextBox and it is implemented using several smaller dialogs. A part of the implementations are internal and cannot be accessed from outside. Could you please share more details on what exactly you would like to customize so I can check what is the approach we could suggest you? 

Regards,
Tanya
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 you to write beautiful native mobile apps using a single shared C# codebase.
0
Michael
Top achievements
Rank 1
Veteran
answered on 16 Oct 2017, 10:01 PM

Hi Tanya,

We're intending to add some custom properties to styles (and elements/spans), which will be rendered by downstream consumers/viewers of the documents we're creating with radrichtextbox.

We're also looking to remove some default controls (eg font size).

The best option i've come up with is to rebuild the dialog with just the elements I need using the decompiled native dialog for guidance.

 

0
Tanya
Telerik team
answered on 19 Oct 2017, 02:22 PM
Hi Michael,

Indeed, following the implementation of the default dialog to build the custom one is the right approach. I am sending you a sample showing how you could customize this dialog. Please, have in mind that the synchronization of list styles uses private API which I couldn't extract in the sample class and this functionality won't work as expected. Hope this will help you achieve the desired results.

Regards,
Tanya
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 you to write beautiful native mobile apps using a single shared C# codebase.
0
Michael
Top achievements
Rank 1
Veteran
answered on 26 Oct 2017, 12:45 AM

Thanks Tanya, this has been a huge help. I've a question about how to apply a theme to the example you supplied.

Setting StyleManager.Theme seems to do the job at design time, but it's still displaying the default theme at run time.

<dialogs:RadRichTextBoxWindow 

                            x:Name="StyleFormattingProperties"
                            telerik:StyleManager.Theme="Expression_Dark"

0
Accepted
Tanya
Telerik team
answered on 30 Oct 2017, 02:37 PM
Hello Michael,

I couldn't reproduce an issue similar to the one you are observing. Can you please share some sample code so I can locally replicate the setup on your end?

Is it an option for you to set the Application theme? I am asking because this will guarantee that all the controls you are using will be styled in the same way. You can find more information on this approach in the Setting a Theme with Style Manager help topic.

Regards,
Tanya
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 you to write beautiful native mobile apps using a single shared C# codebase.
0
Michael
Top achievements
Rank 1
Veteran
answered on 01 Nov 2017, 04:36 AM

Setting the theme in the way specified by the link provided did the trick.

Thanks Tanya!

Tags
RichTextBox
Asked by
Michael
Top achievements
Rank 1
Veteran
Answers by
Tanya
Telerik team
Michael
Top achievements
Rank 1
Veteran
Share this question
or