This project is read-only.

FixedPageViewer not showing document

Apr 7, 2014 at 12:13 PM
Document preview inside FixedPageViewer it is shown only when debugger is attached. It is license related problem ?
Apr 8, 2014 at 1:15 PM
No, the evaluation edition is fully functional. Are you using a custom style document viewer?
Apr 9, 2014 at 10:39 AM
Edited Apr 9, 2014 at 11:08 AM
It is almost identical like SampleSinglePage.xaml from samples, I'm using FixedPageViewer control without templating. Any ideas ?

Silverlight 5.
Apr 9, 2014 at 11:16 AM
Can you share some source code?
Apr 9, 2014 at 2:20 PM
Of course, here is my xaml (with debugger attached to process everything works fine):
<doc:PageNavigator Grid.Column="0" Grid.Row="0" x:Name="PageNavigator" Visibility="Collapsed"
                PageCount="{Binding PageCount, ElementName=Viewer}"                              
                PageIndex="{Binding PageIndex, ElementName=Viewer, Mode=TwoWay}"
            <doc:ThumbnailListBox Grid.Column="0" Grid.Row="0" x:Name="Thumbnails" VerticalAlignment="Stretch"
                Visibility="{Binding IsDocumentLoaded, Converter={StaticResource BoolToVisibilityConverterCollapsedWhenFalse}}" 
                PageIndex="{Binding PageIndex, Mode=TwoWay, ElementName=PageNavigator}"
                DocumentDataSource="{Binding Path=DocumentToolkitDataSource, Mode=TwoWay}" />

            <ScrollViewer x:Name="ScrollViewer" HorizontalScrollBarVisibility="Auto" 
                          Grid.Column="1" Grid.Row="0"
                          BorderThickness="0" >
                <Border x:Name="PageViewerBorder" 
                        Background="White" BorderBrush="Transparent" BorderThickness="1" Margin="4" HorizontalAlignment="Center" VerticalAlignment="Center"
                        Visibility="{Binding Document, ElementName=DataSource}" 
                        MouseLeftButtonDown="PageViewerBorder_MouseLeftButtonDown" MouseRightButtonUp="PageViewerBorder_MouseLeftButtonUp"
                        MouseMove="PageViewerBorder_MouseMove" LostMouseCapture="PageViewerBorder_LostMouseCapture">

                    <toolkit:LayoutTransformer LayoutTransform="{Binding DataContext.RotateTransform, ElementName=LayoutRoot}">
                        <doc:FixedPageViewer x:Name="PageViewer"
                                 FixedPage="{Binding FixedPage}"
                                 FixedPageSize="{Binding FixedPageSize}"
                                 FixedPageError="{Binding FixedPageError}"
                                 Scale="{Binding SelectedViewMode.Scale, ElementName=ViewModePicker}"
                                <doc:NavigationBehavior TextContainer="{Binding TextContainer}" />
Apr 9, 2014 at 2:31 PM
Is the DataContext of the FixedPageViewer set at all? Check the Visual Studio output window for binding errors. The PageViewBorder for instance has an invalid binding on the Visibility property; that binding can't work unless you provide a ConverterParameter.
Apr 10, 2014 at 7:28 AM
Edited Apr 10, 2014 at 8:41 AM
Is the DataContext of the FixedPageViewer set at all?
I see document when debugger is attached so it should be set correctly.

Viewer does not work if debugger is detached, so I cannot check the output window without having debugger attached.

I have removed PageViewBorder and still can't see Document.

I could also log some info to isolated storage...
Apr 14, 2014 at 12:33 PM
Edited Apr 14, 2014 at 12:33 PM
I removed visibility from PageViewerBorder so the visibility binding will not fail. I also dumped some data to file.

Without debugger attached (datacontext_changed in FixedPageViewer):

FixedPageSize: 816,1056, inUse: True. FixedPageError: , FixedPage:

FixedPageSize: 816,1056, inUse: True. FixedPageError: , FixedPage:


PS. I bought license for your product
Apr 14, 2014 at 11:48 PM
Maybe the source of the problem lies somewhere else; do you happen to handle to DocumentDataSource.LoadError event? It's possible a load error occurs in release mode.

This is fairly hard to debug; is it possible I get access to (part of) the source of this app, so I can reproduce on my end? You can send it to info [at]
Apr 15, 2014 at 6:52 AM
Edited Apr 15, 2014 at 6:53 AM
Yes I catch load error. There are two main difference between sample code and my. DocumentDataSource is in view model and I'm loading images from database with DotNetZipPackageReader.

unfortunately I cannot give you the sources..
Apr 16, 2014 at 7:03 AM
I solve this problem, thanks for support !