My app has a resizable WPF window with a frame which shows different WPF pages. Most of the time the pages are bigger than the frame and if this is the case, the frame should display scrollbar(s). Unfortunately, it never shows any scrollbar.
Here is my code:
<Grid>
<Frame Name="MainFrame"
NavigationUIVisibility="Hidden"
Width="Auto"
Height="Auto"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
ScrollViewer.CanContentScroll="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" />
</Grid>
Code behind:
MainFrame.Navigate(new Page1());
What did I do wrong?
Try wrapping your
Framein aScrollViewer: