If you are using Telerik’s RadRichTextBox control in your Silverlight application, you might have noticed that the control exposes a format tool which pops up in the screen when you select some text inside the control. This is the same behaviour that you notice in Microsoft Word too.
But for some reason, you might want to hide that toolbar if you are building an application like notepad. This small post will cover the same for you.
Let’s assume a scenario where you are building a Silverlight application which acts like a notepad and there user should not be able to change the color and other formatting options of the selected text. This is very easily achievable using just a TextBox control. But think of an app where you want to provide some other options like inserting table or an image. The default TextBox control will not help you there. For this you have to use a RichTextBox control.
Telerik’s RadRichTextBox control comes with many features that you might not need while developing an app, e.g. the formatting toolbar (as shown here) that automatically pops up in the screen when some text has been selected by end user.
The said toolbar provides you default functionalities like font selection, font size, text alignment, foreground color, text highlight color and many more quick formatting options.
If you don’t need this toolbar to popup in your application, you can easily turn it off by setting the “IsSelectionMiniToolBarEnabled” property of RadRichTextBox control to “False”.
As the default value of the property is “True”, if you want to re-enable it again, just remove the assignment of the property or set it as “True”. This will bring back the toolbar popup again in the screen.
Here is the sample code for you to refer:
<Grid x:Name="LayoutRoot">
<telerik:RadRichTextBox IsSelectionMiniToolBarEnabled="False"/>
</Grid>
If you are working with Telerik’s RadRichTextBox control, don’t forget to check out my another post on this “How to Add or Remove Context Menu Group in Telerik RadRichTextBox?”
If you find this post interesting, don’t forget to share it to your network so that the other can get help from this very easily. Sign-up to my blog’s RSS feed and Email Newsletter to get article updates directly delivered to your inbox. I am available on Twitter, Facebook and Google+. So, connect with me and say a “Hello”.