Connecting a C1RichTextBoxToolbar to a C1RichTextBox

To connect a C1RichTextBoxToolbar control to a C1RichTextBox control you would need to set the RichTextBox property to the name of the control you want to link with the toolbar. You can connect a C1RichTextBoxToolbar control to a C1RichTextBox control at design time, in XAML, and in code.

At Design Time

To set the RichTextBox property in Microsoft Expression Blend, complete the following steps:

1.   Click the C1RichTextBox control once to select it.

2.   Navigate to the Properties window, and click the Advanced Options button next to the RichTextBox property.

3.   In the Create Data Binding dialog box, click the Element Property tab.

4.   In the Element Property tab, select the C1RichTextBox1 item and click OK.

This will set the RichTextBox property to C1RichTextBox1.

In XAML

For example, to set the RichTextBox property add RichTextBox="{Binding ElementName=C1RichTextBox1}" to the <c1rtb:C1RichTextBox> tag so that it appears similar to the following:

<c1rtb:C1RichTextBox HorizontalAlignment="Left" Margin="10,10,0,0" Name="C1RichTextBox1" VerticalAlignment="Top" c1:C1NagScreen.Nag="True" Height="83" Width="208" RichTextBox="{Binding ElementName=C1RichTextBox1}" />

In Code

For example, to set the RichTextBox property add the following code to your project:

      Visual Basic

      C#

What You've Accomplished

You've linked a C1RichTextBoxToolbar to a C1RichTextBox control. Now when you type text in the C1RichTextBox, for example, change the content appearance, for example, the font. For more information about the C1RichTextBox control, see the Working with C1RichTextBoxToolbar topics.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.