This is a migrated thread and some comments may be shown as answers.

Hide Document Background

1 Answer 42 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Maurizio
Top achievements
Rank 2
Maurizio asked on 20 Jun 2012, 03:07 PM
Hello Telerik Team,

how can i hide the marked border (background of the RadDocument). If it is not possible to hide it, how can i change the color to white or transparant?



best regards

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 22 Jun 2012, 09:56 AM
Hello Thomas,

RadRichTextBox has several layout modes. When in Paged layout mode, there is a background similar to that in Word. Its color is set through the theme applied to the control. For example, in the Metro theme, it is much lighter. (See the Telerik Editor Silverlight demo or the Click once demos.)

You can also make the background transparent using the following code:

<telerik:RadRichTextBox.Resources>
    <Style TargetType="telerik:DocumentPrintLayoutPresenter">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:DocumentPrintLayoutPresenter">
                    <Border Background="Transparent" BorderThickness="0">
                        <Grid>
                            <ContentPresenter />
                            <telerik:DropPositionMarker x:Name="DropPositionMarker"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</telerik:RadRichTextBox.Resources>

If you would like to remove the pagination and the background altogether, you can use the default Flow layout mode:

<telerik:RadRichTextBox LayoutMode="Flow" />

Don't hesitate to contact us if you have other questions.

All the best,
Martin
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
Maurizio
Top achievements
Rank 2
Answers by
Martin Ivanov
Telerik team
Share this question
or