Step 2 of 3: Customizing the RichTextBox
In the previous step you created a new Windows Phone application, set the application up, and added the C1RichTextBox control to the application. In this step you'll customize the application further.
Complete the following steps:
1. In the Solution Explorer, right-click the MainPage.xaml file and select View Code to open the code file.
2. In the Code Editor, add the following code to import the following namespaces:
Imports C1.Phone.RichTextBox
•C#
using C1.Phone.RichTextBox;
3. Add the following code to the MainPage constructor:
Me.C1RTB.FontSize = 24
Me.C1RTB.Text = "Hello World! Welcome to the most complete rich text editor available for Windows Phone. Load, edit, and save formatted text as HTML or RTF documents with ComponentOne RichTextBox for Windows Phone. The C1RichTextBox control provides rich formatting, automatic line wrapping, HTML and RTF import/export, table support, images, annotations, and more."
•C#
this.C1RTB.FontSize = 24;
this.C1RTB.Text = "Hello World! Welcome to the most complete rich text editor available for Windows Phone. Load, edit, and save formatted text as HTML or RTF documents with ComponentOne RichTextBox for Windows Phone. The C1RichTextBox control provides rich formatting, automatic line wrapping, HTML and RTF import/export, table support, images, annotations, and more.";
This code adds content to the C1RichTextBox control.
What You've Accomplished
In this step you added content to your C1RichTextBox application, now all that's left is to run it. In the next step you'll run the application and view some of the run-time interactions possible with the C1RichTextBox control.