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 6368159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:38:25+00:00 2026-05-25T00:38:25+00:00

I have seen a few posts here that ask about WPF scrollbars and the

  • 0

I have seen a few posts here that ask about WPF scrollbars and the answer is usually to use a ScrollViewer. The problem with this is, I can only get it to work with a statically sized window. If the window is resized, the scrollviewer gets cut off.

I would like for the NavigationWindow scrollbars to appear, any tips? I’m writing an application that needs to work on a variety of display resolutions.

  • 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-25T00:38:26+00:00Added an answer on May 25, 2026 at 12:38 am

    It turns out that if you set the size of a Page control, then a scrollviewer will not resize with the window as it’s resized. If you have the following code, your scrollviewers will not work right:

    <Page x:Class="SomeNamespace.SamplePage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" Title="SamplePage" Height="400" Width="400">
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <ScrollViewer HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Auto">
            <Border x:Name="BigBadBorder" Height="1000" Width="2000" Background="HotPink" Margin="5">
                <TextBlock Text="Waldo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
        </ScrollViewer>
    </Grid>
    </Page>
    

    If you simply leave out the page height and width properties as follows, it will work fine:

    <Page x:Class="SomeNamespace.SamplePage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" Title="SamplePage">
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <ScrollViewer HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Auto">
            <Border x:Name="BigBadBorder" Height="1000" Width="2000" Background="HotPink" Margin="5">
                <TextBlock Text="Waldo" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
        </ScrollViewer>
    </Grid>
    </Page>
    

    Simple solution in the end 🙂

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

Sidebar

Related Questions

I've seen a few similar posts to my problem, but none that have helped
I've seen a few posts about Application_BeginRequest , but non seems to have my
I've seen a few posts here about issues with relative image paths in CSS
I've seen a few other posts about this on Stack Overflow, but the answer
Ok, here is the deal, I have seen a few posts on SO relating
I've seen a few posts on here about the issue of using retain or
I have seen a few posts regarding this issue but not one specific to
I've seen a few sites that have a flash app which takes video from
I've seen in a few iPhone examples that attributes have used an underscore _
I have seen posts that show three ways to reset the DMV views: Reset

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.