This topic is dedicated to providing a quick overview of the XAML used to create a C1RichTextBox and C1RichTextBoxToolbar control.
To get started developing, add a c1 namespace declaration in the root element tag:
XAML |
Copy Code
|
---|---|
xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" |
Here is a sample C1RichTextBox and C1RichTextBoxToolbar:
Below is the XAML for the sample:
<Window x:Class="RichTextBoxWPFXAML.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"Height="370"Width="697"xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml">
<GridHeight="310">
<StackPanelHorizontalAlignment="Left"Name="SP"VerticalAlignment="Top"Height="327"Width="663">
<c1:C1RichTextBoxToolbarx:Name="richToolbar"RichTextBox="{BindingElementName=C1RTB}" />
<c1:C1RichTextBoxx:Name="C1RTB"Grid.Row="1"BorderThickness="0"Height="165" />
</StackPanel>
</Grid>
</Window>
<UserControl xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
x:Class="SilverlightApplication2.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="489" d:DesignWidth="668">
<Grid x:Name="LayoutRoot" Background="White">
<c1:C1RichTextBox Name="C1RTB" Margin="0,133,12,28" />
<c1:C1RichTextBoxToolbar Name="richToolbar" RichTextBox="{Binding ElementName=C1RTB}" Margin="2,12,12,0" Height="123" VerticalAlignment="Top" />
</Grid>
</UserControl>