3 Answers, 1 is accepted
0
Felix De Lille
Top achievements
Rank 1
answered on 03 Mar 2011, 03:06 AM
I have exactly the same problem with importing a docx.
0
Hi Merokko, Felix,
where the namespaces are declared as follows:
The import of Docx documents that have different page colors, however, will not work until page colors on the document are supported by the format provider. We will consider adding page background color to the document in one of the next releases.
If you have other questions, do not hesitate to contact us again. Greetings,
Iva
the Telerik team
We do not support different page colors of the document yet. If you are using RadRichTextBox in flow layout mode (the default one), you can set RadRichTextBox's Background and if you are using paged layout mode, you can change the template of the page like this:
Copy Code
<
telerik:RadRichTextBox
Name
=
"editor"
KeyDown
=
"editor_KeyDown"
KeyUp
=
"editor_KeyUp"
>
<
telerik:RadDocument
LayoutMode
=
"Paged"
/>
<
telerik:RadRichTextBox.Resources
>
<
Style
TargetType
=
"telerikUI:Page"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerikUI:Page"
>
<
Grid
>
<
Border
Padding
=
"0"
BorderThickness
=
"1"
BorderBrush
=
"#646464"
Margin
=
"-1"
Background
=
"Black"
VerticalAlignment
=
"Stretch"
HorizontalAlignment
=
"Stretch"
>
<
Border.Effect
>
<
DropShadowEffect
Color
=
"#333333"
ShadowDepth
=
"6"
BlurRadius
=
"12"
Opacity
=
"0.7"
/>
</
Border.Effect
>
</
Border
>
<
Canvas
x:Name
=
"PageContentPresenter"
Background
=
"LightGoldenrodYellow"
/>
</
Grid
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"HorizontalAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Top"
/>
</
Style
>
</
telerik:RadRichTextBox.Resources
>
</
telerik:RadRichTextBox
>
where the namespaces are declared as follows:
Copy Code
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikUI="clr-namespace:Telerik.Windows.Documents.UI;assembly=Telerik.Windows.Documents">
The import of Docx documents that have different page colors, however, will not work until page colors on the document are supported by the format provider. We will consider adding page background color to the document in one of the next releases.
If you have other questions, do not hesitate to contact us again. Greetings,
Iva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Merokko
Top achievements
Rank 1
answered on 04 Mar 2011, 11:57 AM
Hello Iva,
Thanks. I can live with only one colour.
Cheers
Thanks. I can live with only one colour.
Cheers