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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:58:36+00:00 2026-05-11T00:58:36+00:00

Basically what I want to do is allow a user to type in a

  • 0

Basically what I want to do is allow a user to type in a string value and have the list box scroll to the item that matches the text they have typed (or the first LIKE match).

If I use the .ScrollIntoView() method, the problem is that it puts the item at teh bottom of the visible area if the item is further down in the list than the current scroll position, and it is at the top if it is higher in the list than the current scroll position. I want to make it consistent by making it the top item in the list (unless of course it can’t be due to being one of the last ‘page’ of items).

I have tried to fake it by selecting the item which is x further down in the list where x is the number of items visible. This works when going down but breaks when going back up. and I’ve been unable to determine which index is currently the one at the top visible spot in my list.

WinForms list boxes have the .TopIndex property which des exactly what I’m looking for, but I’ve been unable to find the WPF equivalent. Anyone out there have an idea how to accomplish this?

Thanks in advance!

  • 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. 2026-05-11T00:58:37+00:00Added an answer on May 11, 2026 at 12:58 am

    Use ScrollIntoView twice, first to show the very last item in the list, then to show your selected item. This way it will always be working from the bottom up. You’ll need to call UpdateLayout after each call to make sure the positions are correct.

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

Sidebar

Ask A Question

Stats

  • Questions 75k
  • Answers 75k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer <script> var a ='test'; alert(a); alert(window['a']); alert(eval('a')); </script> May 11, 2026 at 2:37 pm
  • added an answer Like so? static void Main() { byte[] data = FromHex('47-61-74-65-77-61-79-53-65-72-76-65-72');… May 11, 2026 at 2:37 pm
  • added an answer Instead of using an Ellipse, use a Path, and have… May 11, 2026 at 2:37 pm

Related Questions

I have a little dilemma that maybe you can help me sort out. I've
A little background: I am trying to create a lightweight cookieless database-backed user session
Is there any way for the main form to be able to intercept events
If I need generate a fairly large dataset using LINQ and it may take

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.