Compatible PdfViewer height in WPF

2 posts, 0 answers
  1. Nandhakumar
    Nandhakumar avatar
    6 posts
    Member since:
    Sep 2014

    Posted 13 Sep 2014 Link to this post

    I used RadPdfViewer in WPF. I put the pdfviewer in grid. I set the height="*". But the problem is, the pdfviewer extends beyond the screensize of the window and the scrollviewer also not working. Help me to fix it. I have attcached the Snapshot of the window.

    <Grid  >
           <Grid.RowDefinitions>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
     <telerik:RadPdfViewer Grid.Row="0" x:Name="pdfViewer1"  DocumentSource="{Binding url1}"  telerikControls:StyleManager.Theme="Expression_Dark">
     </telerik:RadPdfViewer>
    </Grid>
  2. Deyan
    Admin
    Deyan avatar
    135 posts

    Posted 17 Sep 2014 Link to this post

    Hello Nandhakumar,

    If you use a single Grid in the Window it will be measured with the window size and the PdfViewer in row with height="*" should be measured in the same finite window height. In the other case when the mensioned Grid is inside some other element (for example Grid with row height="auto") then the inner grid may be measured with height Infinity and in this scenario PdfViewer will be measured with Infinity as well. This is the possible cause of the mensioned issue.

    Could you please check whether in your scenario the Grid is nested in some other element measuring it in Infinity (Grid with row height "Auto", StackPanel, or some other content control)? 

    I am looking forward to contacting you again.

    Regards,
    Deyan
    the Telerik team
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top