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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:19:37+00:00 2026-05-27T13:19:37+00:00

<ScrollViewer VerticalScrollBarVisibility=Auto CanContentScroll=True> <StackPanel Name=basePanel Orientation=Vertical Height=450 /> </ScrollViewer> This is the code for

  • 0
<ScrollViewer VerticalScrollBarVisibility="Auto" CanContentScroll="True">
                <StackPanel Name="basePanel" Orientation="Vertical" Height="450" />
            </ScrollViewer>

This is the code for the stackpanel which is filled in runtime with multiple WrapPanels. Scroll Viewer scrolls through the panels – one at a time – which makes it really inconvenient because all panels are of different sizes. I tried this one by setting ScrollViewer.CanContentScroll=”False” property in StackPanel while deleting it in ScrollViewer, didn’t help – scroll bar disappeared at all. What’s the solution for smooth scroll bar?

  • 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-27T13:19:38+00:00Added an answer on May 27, 2026 at 1:19 pm

    Wrap your StackPanel in another panel

    WPF’s ScrollViewer tries to scroll entire elements into view at a time, which is why you see the jumpy scroll behavior. By nesting the StackPanel in another Panel, the ScrollViewer will try and scroll the entire StackPanel into view, which is too big so it will use smooth scrolling.

    Here’s an example – Removing the DockPanel will give you a jumpy scroll, but with it you’ll get smooth scrolling behavior

    <ScrollViewer VerticalScrollBarVisibility="Auto" CanContentScroll="True" Height="250">
        <DockPanel>
            <StackPanel Name="basePanel" Orientation="Vertical" Width="200">
                <Rectangle Height="75" Fill="Red" Width="200" />
                <Rectangle Height="50" Fill="Orange" Width="200" />
                <Rectangle Height="75" Fill="Yellow" Width="200" />
                <Rectangle Height="75" Fill="Green" Width="200" />
                <Rectangle Height="75" Fill="Black" Width="200"  />
                <Rectangle Height="75" Fill="Purple" Width="200" />
            </StackPanel>
        </DockPanel>
    </ScrollViewer>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets take this code as basis: <ScrollViewer HorizontalScrollBarVisibility=Auto VerticalScrollBarVisibility=Auto> <Grid> <Grid.RowDefinitions> <RowDefinition Height=50 />
Why does this work so well in wpf <ScrollViewer HorizontalScrollBarVisibility=Auto VerticalScrollBarVisibility=Auto> <Canvas x:Name=MyDesigner> </Canvas>
I am developing a Silverlight application which has a list <ListBox x:Name=_list_collection SelectionChanged=SelectionChanged ScrollViewer.VerticalScrollBarVisibility=Auto
<Border CornerRadius=2,2,2,2 BorderThickness=1 BorderBrush=LightSkyBlue Margin=5,2,2,2 x:Name=PersonBorder Visibility=Collapsed> <StackPanel Orientation=Vertical> <ListBox Name=personListBoxTest BorderThickness=0 ScrollViewer.HorizontalScrollBarVisibility=Hidden ScrollViewer.VerticalScrollBarVisibility=Auto
Let's say I have the following ListView: <ListView ScrollViewer.VerticalScrollBarVisibility=Auto> <ListView.View> <GridView> <GridViewColumn Header=Something DisplayMemberBinding={Binding
I've got a page with the following XAML in my application. <ScrollViewer VerticalScrollBarVisibility=Auto> <toolkit:WrapPanel
I have a StackPanel inside of a ScrollViewer. I have a slider that does
I have a Canvas element, contained within a ScrollViewer, which I'm zooming using ScaleTransform.
I am using a scrollviewer control around my stack panel which contains an ItemsControl.
I have a ribbon combob box as: <r:RibbonComboBox DataContext=this SelectionBoxWidth=62 VerticalAlignment=Center IsEditable=True Label=Saved Queries

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.