tags:

views:

54

answers:

2

I have a paged WPF(.Net4) application which is too big for the screen when being used on a netbook. I'd like to be able to resize and scroll (as we do when using a webpage) but currently all items outside of the view are not accessible. I suspect there's probably a simple solution but I just don't know.

Thanks in advance.

UPDATE

The NavigationWindow doesn't support direct content so I have to add the scroll function to each page separately. Is there a better way to do this?

I've added the code below but when the program is resized the scroller doesn't appear. Without the visibility settings it just shows a 'dead' scroller.

 <ScrollViewer CanContentScroll="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">

         <StackPanel Margin="0,40,0,0" Width="600" Height="500">

            <FlowDocumentPageViewer Height="500">
                <FlowDocument>

                    <Paragraph>CONTENT REMOVED FOR BREVITY</Paragraph>

                </FlowDocument>
            </FlowDocumentPageViewer>

         </StackPanel>

            </ScrollViewer>
+5  A: 

Put all your content into a ScrollViewer, that will do it.

Fyodor Soikin
Hi I've added an update relating to your answer.
Chris
First: you can put your NavigationWindow into the ScrollViewer.
Fyodor Soikin
Second: why are you setting `Width` and `Height` on `StackPanel` explicitly?
Fyodor Soikin
+2  A: 

Don't forget you can put HorizontalScrollBarVisibility property (same with Vertical) to "Auto", if you want to display the scrollbars only if necessary

gerrard