Note that there are some explanatory texts on larger screens.

plurals
  1. POScrollviewer having issues with Dockpanel
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/ClvRx.png" alt="http://images.temppic.com/28-11-2011/images_vertis/1322454731_0.87909400.png"> <br></p> <p>I'm using a Dockpanel as my main panel for my layout. The toolbar on top is set to top, while the side panel is set to left. The documentviewer is set to fill by LastChildFill.</p> <p>The problem is that the height of the scrollviewer doesn't scale as the window resizes. Only the documentviewer does. It seems to only scale as the child content increases. I'm trying to mimic Google Chrome's Print layout. When the children does not overflow the window then there is no scrollbar but if it's less than the window, the scrollbars would fill up the window.</p> <p>Here's the code: </p> <pre><code>&lt;ToolBar Width="Auto" Height="35" DockPanel.Dock="Top" VerticalAlignment="Top" HorizontalAlignment="Stretch" Panel.ZIndex="10" Background="White"&gt; &lt;StackPanel Margin="5,0,0,0" Orientation="Horizontal"&gt; &lt;Button Content="New" Style="{StaticResource MenuItem}"/&gt; &lt;Button Content="Save" Style="{StaticResource MenuItem}"/&gt; &lt;Button Content="Print" Style="{StaticResource MenuItem}"/&gt; &lt;Button Content="Delete" Style="{StaticResource MenuItem}"/&gt; &lt;Button Content="Export" Style="{StaticResource MenuItem}"/&gt; &lt;Border Style="{StaticResource SeparatorStyle}"/&gt; &lt;Button Content="Burn DVD" Style="{StaticResource MenuItem}"/&gt; &lt;Button Content="Open Folder" Style="{StaticResource MenuItem}"/&gt; &lt;Border Style="{StaticResource SeparatorStyle}"/&gt; &lt;Button Content="Next Patient" Style="{StaticResource MenuItem}"/&gt; &lt;/StackPanel&gt; &lt;/ToolBar&gt; &lt;ScrollViewer Background="White" x:Name="SidePanel" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Width="400" DockPanel.Dock="Left" Panel.ZIndex="2" Padding="10"&gt; &lt;StackPanel&gt; &lt;StackPanel.Resources&gt; &lt;Style TargetType="{x:Type TextBox}"&gt; &lt;Setter Property="Margin" Value="0,10,0,0"/&gt; &lt;/Style&gt; &lt;/StackPanel.Resources&gt; &lt;Label Content="Patient Report" Style="{StaticResource SidePanel_H1}" /&gt; &lt;Rectangle Style="{StaticResource SidePanel_HR}" /&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;TextBox Text="DATA"/&gt; &lt;/StackPanel&gt; &lt;/ScrollViewer&gt; &lt;Rectangle Height="Auto" Width="2" DockPanel.Dock="Left" Fill="#FFA0A0A0"/&gt; &lt;DocumentViewer x:Name="dv1" AllowDrop="False" Cursor="Hand" Loaded="dv1_Loaded" MinWidth="600"&gt; &lt;FixedDocument Focusable="False" x:Name="FD"&gt; &lt;/FixedDocument&gt; &lt;/DocumentViewer&gt; &lt;/DockPanel&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload