I have a grid with a menu and scrollviewer inside. In scrollviewer, I have a group box with a different grid and inside the webbrowser element.
Now the problem occurs when I make my window smaller than the contents of my web browser content and scroll down in the scrollviewer. Everyone has a margin, so it remains below the top menu, however the webbrowser element does not work, so it covers the menu. Is there any way to solve this? I can't figure it out: margins and pads don't work. I was hoping for a grid element around it or something would do the trick, but nothing would work.
EDIT:
Good. I tried to add xaml code, but I remember that it was insanely huge, so this is an extreme short version: (the webbrowser element is at the bottom of the code)
<Window x:Class="Cleaning_Masters_Official.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Cleaning Masters Offerte Packet - nieuw.off" Name="Main" Width="{DynamicResource {x:Static SystemParameters.MaximizedPrimaryScreenWidthKey}}"
Icon="bin\Debug\Images\Main.ico"
Height="{DynamicResource {x:Static SystemParameters.MaximizedPrimaryScreenHeightKey}}" Closing="Main_Closing"
WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" WindowState="Maximized">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="22" />
<RowDefinition Height="*" />
<RowDefinition Name="rowbar" Height="0" />
</Grid.RowDefinitions>
<ScrollViewer Margin="10" Grid.Row="1">
<TabControl Name="tabChapters">
<TabItem Header="Algemeen" Name="tabGeneral">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Header="Configureer hoofdstukken:" Margin="10" Padding="10">
<Grid>
...
</Grid>
</GroupBox>
<GroupBox Header="Voorpagina Afbeeldingen:" Margin="10,0,10,10" Padding="10" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2">
<Grid VerticalAlignment="Top">
...
</Grid>
</GroupBox>
<GroupBox Header="Offerte Info:" Margin="10,10,10,10" Padding="10" Grid.Column="1" Grid.Row="0">
<Grid>
...
</Grid>
</GroupBox>
<GroupBox Margin="0,10,10,10" Header="Inhoudstafel:" Grid.Column="2" Grid.RowSpan="2">
<Grid>
<WebBrowser Margin="10" Name="wbInhoudstafel"/>
</Grid>
</GroupBox>
</Grid>
</TabItem>
<TabItem Header="1. Voorwoord" Name="tabVoorwoord">
</TabItem>
...
</TabItem>
</TabControl>
</ScrollViewer>
<Menu DockPanel.Dock="Top" Name="TopMenu">
...
</Menu>
<StatusBar Name="sbar" Grid.Row="2"
...
</StatusBar>
</Grid>
</Window>