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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:39:14+00:00 2026-05-26T14:39:14+00:00

I have a ScrollViewer that has an items source. The number of items in

  • 0

I have a ScrollViewer that has an items source. The number of items in this could number in the tens of thousands and are streamed from the web server. We already are setting these two properties:

VirtualizingStackPanel.VirtualizationMode="Recycling" ScrollViewer.IsDeferredScrollingEnabled="True" 

These work perfectly fine for dragging the thumb (button in the middle of the scroll bar) around, but when a user holds down the down arrow or clicks and holds down on the DecreaseRepeatButton or IncreaseRepeatButton (the invisible buttons above and below the thumb), the deferred scrolling is no longer respected and items scroll into view and chew through server resources.

What I would like to do is two fold:

1) Use deferred scrolling for the down/up arrows. In the absence of this we can increase the delay of the repeat button so holding down the button doesn’t continuously scroll.

2) Update the LargeChange of the Decrease/Increase repeat button so the user is scrolling 10% each time.

I have already tried descending down the visual tree for “PART_VerticalScrollBar” and setting LargeChange on the System.Windows.Controls.Primitives.ScrollBar to no avail.

I can hook into the property of the scroll bar and the thumb position is updated but then I can no longer drag the thumb.

Any help would be greatly appreciated.

  • 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-26T14:39:15+00:00Added an answer on May 26, 2026 at 2:39 pm

    I got it to work with a control template. It still looks janky as hell, but it works.

    <ControlTemplate x:Key="templateScroll"
                     TargetType="{x:Type ScrollBar}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="1*" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
    
                    <RepeatButton Grid.Row="0" 
                          Command="ScrollBar.LineUpCommand" Interval="1000" Style="{DynamicResource Scrollbar_LineButton}" Content=" ^" />
    
                    <Track Grid.Row="1" Name="PART_Track">
                        <Track.DecreaseRepeatButton>
                            <RepeatButton Command="ScrollBar.PageUpCommand"  Interval="1000" />
                        </Track.DecreaseRepeatButton>
                        <Track.Thumb>
                            <Thumb />
                        </Track.Thumb>
                        <Track.IncreaseRepeatButton>
                            <RepeatButton Command="ScrollBar.PageDownCommand" Interval="1000"/>
                        </Track.IncreaseRepeatButton>
    
    
                    </Track>
    
                    <RepeatButton Grid.Row="2" Interval="1000" Command="ScrollBar.LineDownCommand" Style="{DynamicResource Scrollbar_LineButton}" Content=" v"  />
                </Grid>
            </ControlTemplate>
    

    I then apply the template dynamically in the code behind by getting the PART_VerticalScrollBar and setting it like so:

    scrollBarControl.SetValue(System.Windows.Controls.Primitives.ScrollBar.TemplateProperty, Me.Resources("templateScroll"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight 4 out-of-browser application with a ScrollViewer that has several RichTextBoxes
I have a simple TextBlock like this (it has to be a TextBlock): <ScrollViewer
I have a scrollview control that has a StackPanel (Orientation=Vertical) UI Element inside of
I have an ScrollViewer that I am trying to do data binding on the
I have a StackPanel inside of a ScrollViewer. I have a slider that does
I have a ItemsControl in a ScrollViewer, and when the items exceed the width
I have a Window that has two primary areas. One is a TextBox inside
I have a ListBox. It has internal ScrollViewer, so I can scroll ListBox content
I have a ListBox that has a grid in its template to allow 4
I have an application written in WPF with a ScrollViewer controlling a Canvas. This

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.