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

Change background

1 Answer 46 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Henrik Skak Pedersen
Top achievements
Rank 1
Henrik Skak Pedersen asked on 16 May 2013, 04:59 PM
Hi,

Is it possible to change the background of the pdfviewer?

Thanks
Henrik

1 Answer, 1 is accepted

Sort by
0
Accepted
Todor
Telerik team
answered on 21 May 2013, 08:37 AM
Hi Henrik,

First of all, I want to thank you for your interest in RadPdfViewer.

Now straight to the question - in case you are using normal assemblies (with XAML included), you can define the below style in an appropriate place in the XAML part of your application:
<Style TargetType="pdfViewerUI:FixedDocumentPagesPresenter">
            <Setter Property="Background" Value="Yellow" />
</Style>
Here, "pdfViewerUI" is a prefix for the following namespace: "clr-namespace:Telerik.Windows.Documents.UI;assembly=Telerik.Windows.Controls.FixedDocumentViewers".

In case you are using NoXAML binaries, or with other words - you are using implicit styles, you can edit directly the RadPdfViewer XAML part. The style you need to edit is "FixedDocumentPagesPresenterStyle". 

In case you're using implicit styles, but you are merging the RadPdfViewer style files from a theme assembly and you cannot edit directly its XAML, you can base the style which I mentioned a few lines above, on "FixedDocumentPagesPresenterStyle" style. This means, that the result should be like this:
<Style TargetType="pdfViewerUI:FixedDocumentPagesPresenter" BasedOn="{StaticResource FixedDocumentPagesPresenterStyle}">
            <Setter Property="Background" Value="Yellow" />
        </Style>

Hope this helps. If you have any other issues or concerns, please do not hesitate to contact us again.

 

Regards,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PDFViewer
Asked by
Henrik Skak Pedersen
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or