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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:12:18+00:00 2026-05-27T21:12:18+00:00

I use listbox.ScrollIntoView(item), but as long as this item is in listbox view, it

  • 0

I use listbox.ScrollIntoView(item), but as long as this item is in listbox view, it won’t scroll.
Actually I want the item to be centered in the listbox’s view. Is there anyway to do this?

  • 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-27T21:12:18+00:00Added an answer on May 27, 2026 at 9:12 pm

    Unfortunately this is not all that easy, it depends on whether your listbox is virtualized or not, which depends on the panel that it uses to render its contents. For a non-virtualizing listbox, you can set the vertical scroll position by invoking the following method on the ScrollViewer which is part of the listbox template, where offset is in pixels.

    ScrollViewer.ScrollToVerticalOffset(offset);
    

    For virtualizing, you can invoke the following method on the VirtualizingStackPanel, where offset is the list location (you can use a double value, i.e. scrolling to 3.5 will scroll to half way between index 3 and 4):

    ItemsHostStackPanel.SetVerticalOffset(offset);
    

    For how to use this code in context, look at the jump list control I implemented here:

    http://wp7contrib.codeplex.com/SourceControl/changeset/view/72741#1502048

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

Sidebar

Related Questions

Below code is working for list view, but i want to use listbox instead
Can I use ListBox control in MS CRM? I want to scroll the list
I sort and group listbox items, I use CollectioView on this purpose. From view
Some say I can use ScrollIntoView method to deal with this issue, but ScrollIntoView
I use SendMessage(hList, LB_SETITEMDATA, pos, (LPARAM) data ); for adding names to listbox. But
How do I set the selected item of a listbox? When I use SelectedValue,
i'm using a listbox style twice in my project so i want to use
I have two views of some data: a list view (a ListBox now, but
I use SetItemDataPtr to set listbox items pointers to my data, but i cannot
Is there a way to use the listbox with a htmlstring? listbox.items.add( <font color='#efefef'

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.