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

How can I customize the spell check popup menu?

4 Answers 124 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 17 Mar 2011, 05:02 PM
Hello,
I am using your richtextbox to visualize simple text.
Following the threads in this forum I was able to configure the component correctly but the only piece that I am missing is how to customize the spell check popup (the one that appears when you have typed a wrong) to remove/hide the entries "Font...", "Paragraph...", Hyperlink...".
 Also I would like to edit its template to apply a different theme to its UI.
Browsing between its properties I was able to find the template for the "add to dictionary" dialog but not the check popup menu.

Any help will be greatly appreciated.

Thanks,
Frank

4 Answers, 1 is accepted

Sort by
0
Accepted
Boby
Telerik team
answered on 21 Mar 2011, 02:51 PM
Hi Frank,

You can customize context menu in various ways (the article is a little outdated - now hyperlink commands are in separate group so you have to hide it as well). The ContextMenu class (the one that is used by default from RadRichTextbox) internally uses RadContextMenu, so you can customize its appearance by implicit styling. If the default context menu doesn't fit your need, you can completely replace it with your own one and RadRichTextBox  will load and use yours through MEF. In the latter case you should impement IContextMenu interface and mark your implementation with CustomContextMenuAttribute.
Don't hesitate to contact us if you have other questions.

Greetings,
Boby
the Telerik team
0
Toby Riley
Top achievements
Rank 1
answered on 08 Apr 2011, 11:11 AM
Do you have a sample if the styling of the context menu and also the loading via MEF?
0
Boby
Telerik team
answered on 11 Apr 2011, 02:26 PM
Hello Tobias Riley,

One simple example of implicit styling is the following (when added to application resources):

<Application.Resources>
    <Style TargetType="telerik:RadContextMenu">
        <Setter Property="FontFamily" Value="Comic Sans MS" />
    </Style>
</Application.Resources>

This changes the font of context menu to Comic Sans. 

Please find an example of sample custom context menu implementation in the attached project.

Best wishes,
Boby
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Toby Riley
Top achievements
Rank 1
answered on 12 Apr 2011, 12:29 PM
Thanks Boby, just what I needed.
Tags
RichTextBox
Asked by
Frank
Top achievements
Rank 1
Answers by
Boby
Telerik team
Toby Riley
Top achievements
Rank 1
Share this question
or