ContentToPlainTextConverter Class

A Content-to-text converter associated with a binding.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v21.1.dll

Declaration

[ValueConversion(typeof(RichEditDocumentContent), typeof(string))]
public class ContentToPlainTextConverter :
    ContentToSpecificFormatConverter

Remarks

The ContentToPlainTextConverter implements the IValueConverter interface. Use the ContentToPlainTextConverter class to convert the control’s content to plain text format.

The code sample below binds standard TextControl to the RichEditControl using the ContentToPlainTextConverter class.

A BarManager component enables the hover menu.

View Example

<Window.Resources>
    <dxre:ContentToPlainTextConverter x:Key="ContentPlainConverter" />
    <dxre:RichEditUICommand x:Key="commands" />
</Window.Resources>

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition />
        <ColumnDefinition/>
    </Grid.ColumnDefinitions>
    <dxb:BarManager Name="barManager1" Grid.Column="0"> 
                    <dxre:RichEditControl x:Name="richEditControl1"  Height="Auto" Width="Auto" 
                       BarManager="{Binding ElementName=barManager1}" ActiveViewType="Simple" />
    </dxb:BarManager>
    <TextBox Text="{Binding ElementName=richEditControl1, Path=Content, Converter={StaticResource ContentPlainConverter}, Mode=OneWay}" 
        x:Name="textBox1" Grid.Column="1" Height="Auto" Width="Auto"/>
</Grid>

Inheritance

Object
ContentToSpecificFormatConverter
ContentToPlainTextConverter
See Also