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

Modifying the SelectionMiniToolBar

5 Answers 129 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Ola Karlsson
Top achievements
Rank 1
Ola Karlsson asked on 13 Dec 2010, 03:47 AM
Hi there,

I've seen a couple posts about this topic but I'm still unsure how to go about my task.

I want to remove certain options from the normal mini toolbar, specifically the "font selection", "font size", "font color" and "highlighting".

A description of how I could do this, would be greatly appreciated.

Cheers,
Ola Karlsson

5 Answers, 1 is accepted

Sort by
0
Accepted
Iva Toteva
Telerik team
answered on 14 Dec 2010, 04:01 PM
Hello Ola Karlsson,

There is a blogpost dealing with this question here. You cannot add or remove buttons to the default SelectionMiniToolBar, but you can create your custom selection mini toolbar, implementing ISelectionMiniToolBar and mark it with the [CustomSelectionMiniToolBar] attribute. It will then be automatically loaded by MEF. if you do not want to use MEF, you can manually invoke:

this.radRichTextBox.SelectionMiniToolBar = new MySelectionToolBar();

Try it out and let us know if you encounter any difficulties.

Greetings,
Iva
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Bob
Top achievements
Rank 1
answered on 07 Feb 2011, 11:12 PM
Does Telerik not provide source code for doing things like this? Would be darn handy, and then devs like myself would be able to do work quicker.
0
Boby
Telerik team
answered on 09 Feb 2011, 12:16 PM
Hello Bob,
All customers who have purchased the Silverlight/WPF suite get access to the full source code. Notably, RadRichTextBox's source is available on demand, through a support ticket.

Best wishes,
Boby
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Martin Gunn
Top achievements
Rank 1
answered on 18 Apr 2011, 04:58 PM
Hey guys,
Just wondering if it would be possible for us to have a copy of the RichText Source code, i can raise a support ticket for this if required,

can you let me know if the source code includes an example ISelectionMiniToolBar ? as we do not want to use MEF, but would like the use of a SelectionMiniToolBar without too much work, also this would be implimented in WPF NOT Silverlight...
0
Boby
Telerik team
answered on 18 Apr 2011, 05:33 PM
Hello Peter Michie,

One sample implementation of custom selection mini toolbar can be found in this forum thread (the code can be easily ported to WPF, as the API is almost exactly the same). If you do not want to use MEF, you can just create an instance of the type manually and assign it to the SelectionMiniToolBar property of RadRichTextBox.
The default implementation - SelectionMiniToolBar -  is in Telerik.Windows.Controls.RichTextBoxUI assembly.
If you need RadRichTextBox's source code - just open support ticket with inquiry and we will provide it to you.
Don't hesitate to contact us if you have other questions.

Kind regards,
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
Tags
RichTextBox
Asked by
Ola Karlsson
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Bob
Top achievements
Rank 1
Boby
Telerik team
Martin Gunn
Top achievements
Rank 1
Share this question
or