6 Answers, 1 is accepted
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
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.
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
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"
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
Setting the theme in the way specified by the link provided did the trick.
Thanks Tanya!