How to set a background color different to this upside and downside pdf?

Hello, I want to tha backgtound color around this pdf (this grey color) to be equal to the background to the app. How can I do this? 

This is my code:

  BackgroundColor="{StaticResource BackgroundColor}">

    <ContentView.BindingContext>

<local:PdfViewerViewModel></local:PdfViewerViewModel>

</ContentView.BindingContext>

   <Grid>

        <syncfusion:SfPdfViewer x:Name="pdfViewerControl" InputFileStream="{Binding About}"

HyperlinkClicked="pdfViewerControl_HyperlinkClicked"

AllowHyperlinkNavigation="True"

    IsToolbarVisible="False"

EnableScrollHead="False"

                                HorizontalOffset="0"

                                VerticalOffset="0"

                                VerticalOptions="FillAndExpand"/>

   </Grid>

</ContentView>



1 Reply

VD Vikram Devaraj Syncfusion Team July 9, 2021 01:42 PM UTC

Hi Alysson  
 
Greetings from Syncfusion support,  
You can customize the background color of SfPdfViewer using the SfPdfViewerBackgroundColor key.  Please find the sample code snippet for the same from below,   
<Application xmlns="http://xamarin.com/schemas/2014/forms"   
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:syncCore="clr-namespace:Syncfusion.XForms.Themes;assembly=Syncfusion.Core.XForms"   
             x:Class="GettingStarted.App">   
   
    <Application.Resources>   
        <syncCore:SyncfusionThemeDictionary>   
            <syncCore:SyncfusionThemeDictionary.MergedDictionaries>   
                <ResourceDictionary>   
                    <x:String x:Key="SfPdfViewerTheme">CommonTheme</x:String>   
                    <Color x:Key="SfPdfViewerBackgroundColor">#2A2A2A</Color>         
                </ResourceDictionary>   
            </syncCore:SyncfusionThemeDictionary.MergedDictionaries>   
        </syncCore:SyncfusionThemeDictionary>   
    </Application.Resources>   
       
</Application>   












 
  
  
  
  
  
  
  
  
  
  
For more reference, please find the simple sample from the following link,   
   
To customize other SfPdfViewer items, please refer to the below documentation link,   
 
Regards,
Vikram D 
 


Loader.
Up arrow icon