To connect a C1RichTextBoxToolbar control to a C1RichTextBox control you would need to set the C1RichTextBoxToolbar.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 C1RichTextBoxToolbar.RichTextBox property in Microsoft Expression Blend, complete the following steps:
This will set the C1RichTextBoxToolbar.RichTextBox property to C1RichTextBox1.
In XAML
For example, to set the C1RichTextBoxToolbar.RichTextBox property addRichTextBox="{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 C1RichTextBoxToolbar.RichTextBox property add the following code to your project:
Visual Basic |
Copy Code
|
---|---|
Me.C1RichTextBoxToolbar1.RichTextBox = C1RichTextBox1
|
C# |
Copy Code
|
---|---|
this.c1RichTextBoxToolbar1.RichTextBox = c1RichTextBox1;
|
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.