In this step, you'll create a new Universal Windows application, add a C1RichTextBox control, and add the markup to create the C1RichTextBox control and a C1RichTextBoxMenu control.
XAML |
Copy Code
|
---|---|
xmlns:c1RTB="using:C1.Xaml.RichTextBox"
|
XAML |
Copy Code
|
---|---|
<Grid.Resources> <DataTemplate x:Name="printTemplate"> <Grid Height="{Binding ViewManager.PresenterInfo.Height}" Width="{Binding ViewManager.PresenterInfo.Width}"> <c1RTB:C1RichTextPresenter Source="{Binding}" Margin="{Binding ViewManager.PresenterInfo.Padding}" /> </Grid> </DataTemplate> </Grid.Resources> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition/> </Grid.RowDefinitions> |
XAML |
Copy Code
|
---|---|
<Button x:Name="btnPrint" Content="Print" HorizontalAlignment="Left" Click="btnPrint_Click" /> |
XAML |
Copy Code
|
---|---|
<c1RTB:C1RichTextBoxMenu x:Name="rtbMenu" RichTextBox="{Binding ElementName=rtb}" Grid.Row="1" /> <c1RTB:C1RichTextBox x:Name="rtb" Grid.Row="1" FontFamily="Times New Roman" FontSize="20" ViewMode="Print" HorizontalContentAlignment="Center" Background="#EEEEEE"/> |
In this step, you set up a new Universal Windows application, added the appropriate references for the application, and added C1RichTextBox controls to the application. In the next step, you'll add the appropriate resource files and some application code.