How to: Show RichTextBox in Cards

The following example illustrates how to embed a standard RichTextBox control into DXGrid cells.

<dxg:GridControl Name="grid">
    <dxg:GridControl.Columns>
        <dxg:GridColumn FieldName="ID" />
        <dxg:GridColumn FieldName="Trademark" />
        <dxg:GridColumn FieldName="Model" />
        <dxg:GridColumn Header="Description" FieldName="RtfContent" AllowGrouping="False" Width="400">
            <dxg:GridColumn.CellDisplayTemplate>
                <DataTemplate>
                    <local:RichTextBoxEx BorderThickness="0" RtfText="{Binding Path=Value, Mode=OneWay}"
                                         HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
                </DataTemplate>
            </dxg:GridColumn.CellDisplayTemplate>
            <dxg:GridColumn.CellEditTemplate>
                <DataTemplate>
                    <local:RichTextBoxEx BorderThickness="0" RtfText="{Binding Path=Value, Mode=TwoWay}"
                                         HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible" />
                </DataTemplate>
            </dxg:GridColumn.CellEditTemplate>
        </dxg:GridColumn>
    </dxg:GridControl.Columns>
    <dxg:GridControl.View>
        <dxg:TableView Name="view" GetActiveEditorNeedsKey="view_GetActiveEditorNeedsKey"
                       ProcessEditorActivationAction="view_ProcessEditorActivationAction"/>
    </dxg:GridControl.View>
</dxg:GridControl>