Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6864997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:59:06+00:00 2026-05-27T02:59:06+00:00

I’m using a Dockpanel as my main panel for my layout. The toolbar on

  • 0

http://images.temppic.com/28-11-2011/images_vertis/1322454731_0.87909400.png

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.

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.

Here’s the code:

<ToolBar Width="Auto" Height="35" DockPanel.Dock="Top" VerticalAlignment="Top" HorizontalAlignment="Stretch" Panel.ZIndex="10" Background="White">

<StackPanel Margin="5,0,0,0" Orientation="Horizontal">
    <Button Content="New" Style="{StaticResource MenuItem}"/>
    <Button Content="Save" Style="{StaticResource MenuItem}"/>
    <Button Content="Print" Style="{StaticResource MenuItem}"/>
    <Button Content="Delete" Style="{StaticResource MenuItem}"/>
    <Button Content="Export" Style="{StaticResource MenuItem}"/>
    <Border Style="{StaticResource SeparatorStyle}"/>
    <Button Content="Burn DVD" Style="{StaticResource MenuItem}"/>
    <Button Content="Open Folder" Style="{StaticResource MenuItem}"/>
    <Border Style="{StaticResource SeparatorStyle}"/>
    <Button Content="Next Patient" Style="{StaticResource MenuItem}"/>
</StackPanel> 

</ToolBar>

<ScrollViewer Background="White" x:Name="SidePanel" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Width="400" DockPanel.Dock="Left" Panel.ZIndex="2" Padding="10">
<StackPanel>
    <StackPanel.Resources>
    <Style TargetType="{x:Type TextBox}">
        <Setter Property="Margin" Value="0,10,0,0"/>
    </Style>
    </StackPanel.Resources>
<Label Content="Patient Report" Style="{StaticResource SidePanel_H1}" />
<Rectangle Style="{StaticResource SidePanel_HR}" />
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>
<TextBox Text="DATA"/>

</StackPanel>
</ScrollViewer>

<Rectangle Height="Auto" Width="2" DockPanel.Dock="Left" Fill="#FFA0A0A0"/>

<DocumentViewer x:Name="dv1" AllowDrop="False" Cursor="Hand" Loaded="dv1_Loaded" MinWidth="600">
    <FixedDocument Focusable="False" x:Name="FD">
    </FixedDocument>
</DocumentViewer>


</DockPanel>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:59:06+00:00Added an answer on May 27, 2026 at 2:59 am

    Set VerticalAlignment="Stretch" or remove the attribute and you’ll be fine.

    DockPanel affects only one direction for docked children. In your case, it’s horizontal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.