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

  • SEARCH
  • Home
  • 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 7726815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:18:28+00:00 2026-06-01T05:18:28+00:00

I am replacing the scroll bar for a list view with a scroll up

  • 0

I am replacing the scroll bar for a list view with a “scroll up” and “scroll down” buttons. My question is, is there any way to show the buttons only when the list box can be scrolled?

i.e. My listbox may only have a couple of items…in that case I wouldn’t need to show the buttons becuase there is nothing to scroll to.

I’m implmenting this across multiple listboxes and there is no set size of the items/lisboxes. I’m hoping there is some event that I can hook onto like a “scrollviewer_initializeed” or something.

  • 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-06-01T05:18:29+00:00Added an answer on June 1, 2026 at 5:18 am

    Set the ListBox.ScrollView.VerticalScrollBarVisibility to Hidden and handle the ListBox.ScrollView.ScrollChanged event like this:

    <ListBox ScrollViewer.ScrollChanged="ListBox_ScrollChanged"
             ScrollViewer.VerticalScrollBarVisibility="Hidden" />
    

    And then add this method to handle the ScrollChanged event:

    private void ListBox_ScrollChanged(object sender, ScrollChangedEventArgs e)
    {
        ButtonScrollUp.Visibility = ButtonScrollDown.Visibility = 
            ((ScrollViewer)e.OriginalSource).ScrollableHeight > 0 
                ? Visibility.Visible 
                : Visibility.Collapsed;
    }
    

    This is assuming your buttons are named ButtonScrollUp and ButtonScrollDown.

    ScrollViewer.ScrollableHeight will equal the number of items out of view, so if it is greater than 0 your buttons should be visible.

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

Sidebar

Related Questions

Is there a way, using either CSS or JavaScript, to get rid of the
[ Edit: I'm replacing the original, confusing question with a simplified example demonstrating the
Replacing the Special Character using Perl while i am doing this . I got
While replacing a pattern in a string, I specifically need the integer/long value of
My customer is replacing MS Office with OpenOffice in some workstations. My program export
We're currently replacing all special characters and spaces in our URLs with hypens (-).
We are looking at replacing a proprietary calendar control. I've looked at scal http://scal.fieldguidetoprogrammers.com
I'm replacing an old web application with a new one, with different structure. I
We're replacing a static web-site with a Django app. All the uri's will change.
I'm interested in replacing an aging control we use in our project that is

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.