We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Scrollbars not working

I have this following code

<Grid x:Name="minutesGrid" Height="1000" Width="1024" Background="White" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="100"/>
                    <RowDefinition Height="750"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>

                <StackPanel Grid.Row="1" Background="White" Height="50" Orientation="Vertical" >
                    <TextBlock x:Name="minutesTitle" Text="" FontFamily="Segoe UI Semilight" FontWeight="SemiLight" FontSize="24" TextAlignment="Center"  Foreground="{StaticResource BrandBrush}" Margin="0,15,0,0"></TextBlock>
                </StackPanel>
                <StackPanel Grid.Row="2" Background="White">
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" HorizontalScrollMode="Disabled" VerticalScrollMode="Enabled" VerticalScrollBarVisibility="Visible" Height="100">
                        <TextBlock x:Name="minutesDesc" Text=""  FontFamily="Segoe UI Semilight" FontWeight="SemiLight" FontSize="24" Foreground="{StaticResource BrandBrush}" Margin="15,15,0,0" TextWrapping="WrapWholeWords"></TextBlock>
                    </ScrollViewer>
                </StackPanel>
                <StackPanel  Grid.Row="3" Background="White">
                    <PdfViewer:SfPdfViewerControl x:Name="minutesPDF" Canvas.ZIndex="1"/>
                </StackPanel>
            </Grid>

and when i load the pdf it doesnt show the scrollbars or lets me do a scroll either with mousewheel or on tablet with fingers.

this is how i load my file

            var datapdf = await objService.DownloadFileService("teste.pdf",minutes.gappFile._id);

            PdfLoadedDocument pdf = new PdfLoadedDocument(Convert.FromBase64String(datapdf));
            
            await minutesPDF.LoadDocumentAsync(pdf);
            minutesPDF.ViewMode = Syncfusion.Windows.PdfViewer.PageViewMode.Normal;


do i need to add something else?
ill attach the file also 

Attachment: teste_99ccba1f.zip

1 Reply

SS Sathish Sivakumar Syncfusion Team October 13, 2015 12:35 PM UTC

Hi Ric,

Since StackPanel has a default behavior to grow in one direction, scroll of the control included in the StackPanel will not be initiated without the height property being set to it. We have attached the simple sample in the following which resolves the above mentioned issue by setting the height of the SfPdfViewerControl which is in the StackPanel,

http://www.syncfusion.com/downloads/support/forum/120755/ze/SampleWRT-1578787932

Regards,
Sathish Sivakumar

Loader.
Live Chat Icon For mobile
Up arrow icon