Change background

2 posts, 1 answers
  1. Henrik Skak Pedersen
    Henrik Skak Pedersen avatar
    16 posts
    Member since:
    Nov 2006

    Posted 16 May 2013 Link to this post

    Hi,

    Is it possible to change the background of the pdfviewer?

    Thanks
    Henrik
  2. Answer
    Todor
    Admin
    Todor avatar
    168 posts

    Posted 21 May 2013 Link to this post

    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.

  3. DevCraft banner
Back to Top