RichTextBox for WinRT
Step 1 of 3: Creating a Windows Store Application

In this step you'll create a new Windows Store application, set the application up, and add the C1RichTextBox control to the application. After completing this step, you should have a mostly functional Rich Text editor.

Complete the following steps:

  1. In Visual Studio select File | New | Project.
  2. In the New Project dialog box, expand a language in the left pane, under the language select Windows Store, and in the templates list select Blank App (XAML). Enter a Name and click OK to create your project.
  3. Right-click the project name in the Solution Explorer and select Add Reference.
  4. In the Reference Manager dialog box, select Studio for UWP/WinRT Edition and click OK to close the dialog box and add the reference.
  5. Open MainPage.xaml if it isn't already open, and add the following markup within the <Page> tag:
XAML Markup
Copy Code
xmlns:RichTextBox="using:C1.Xaml.RichTextBox"

This adds references to the C1.Xaml.RichTextBox assembly to the project.

  1. In the XAML window of the project, place the cursor between the <Grid x:Name="ContentPanel"></Grid> tags and click once.
  1. Add the following markup within the <Grid> tags to add the C1RichTextBox control. Note that this markup gives the control a name:  
XAML Markup
Copy Code
<RichTextBox:C1RichTextBox Name="RTB1" />
  1. Place your cursor beneath the markup for the C1RichTextBox control you just added. Locate the C1RichTextBoxMenu control in the Visual Studio Toolbox and double-click to add it to your application.
  2. Edit the C1RichTextBoxMenu markup so that it resembles the following sample. This will give the C1RichTextBoxMenu a name and bind it to the C1RichTextBox control:
XAML Markup
Copy Code
<RichTextBox:C1RichTextBoxMenu x:Name="rtbMenu" RichTextBox="{Binding ElementName=RTB1}" />

  What You've Accomplished

If you run the application, you'll see an almost fully functional C1RichTextBox application. You can enter and edit text in the C1RichTextBox control. In the next step you'll customize the application further.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback