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

RadRichTextBoxRibbonUI - How to apply custom style to FontPropertiesDialog?

1 Answer 144 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rob
Top achievements
Rank 1
Rob asked on 06 Nov 2012, 08:45 PM
Hello,

How do I apply a custom style to the FontPropertiesDialog (to start, but all of the exposed dialogs in the future) used in the RadRichTextBoxRibbonUI?  I want to make the dialogs appear as if they "belong" to our application...

Thanks,
Rob

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 07 Nov 2012, 02:16 PM
Hello Rob,

Firstly, to style the RadRichTextBox dialogs, you should use implicit styles in your application. This will say that you have to use NoXAML binaries and external themes in your project. How to do that, you can read here

Secondly, the RadRichTextBox dialogs are composed by other controls - RadButtons, RadListBox and other Telerik RadControls. The dialogs also contain default Microsoft controls such as RadioButton, CheckBox, ScrollViewer and etc. These default Microsoft controls are styled in the System.Windows.xaml file. 

In order to create your own custom styles, you should style the controls they use first. You should create these styles based on the previously created ones with the same TargetType.
This will say that if you want to set the Background of the RadButton control to Blue and keep all its other properties, you should do it like this:

<Style TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="Background" Value="Blue" />
</Style>

You can read more about how to base your own styles here.
In addition, you can see the styles' keys in the respective xaml file which contains the control's style.

For your convenience, I have created a sample demo project which illustrates the above described approach. It is attached in my post, so you can see it.

Hope this helps. If you have any other questions, please get back to us.

Kind regards,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Rob
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or