RichTextBoxOverflow Control in SilverLight 5

By | April 15, 2011

One of the interesting control that was introduced with Silverlight 5  is the RichTextBoxOverflow control. This control will show up the portion of the RichTextbox which is overflown to it. A special property called OverflowContentTarget is added to the RichTextBox control to specify the Overflow control.

<RichTextBox OverflowContentTarget="{Binding MyOverflowControl}" />
<RichTextBoxOverflow x:Name="MyOverflowControl" 
                     OverflowContentTarget="{Binding MyOverflowControl2}"/>
<RichTextBoxOverflow x:Name="MyOverflowControl2" />


From the code, you will see the First RichTextBox overflows automatically to he overflow control and eventually both control behaves one homogeneous control. It allows you to select the portion overflown to other control and hence these control is actually an option to show up the portion that is not viewed in the original RichTextBox.