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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:40:27+00:00 2026-06-18T04:40:27+00:00

It seems when applying alternating row background colours today on Windows Phone 7, if

  • 0

It seems when applying alternating row background colours today on Windows Phone 7, if you have a large set of items to be displayed in the ListBox, the row colours eventually drift out, double up and skip rendering.

Anyone had problems with this, is this a bug in Windows Phone? My code can’t get much simpler. I followed this article precisely: http://chillijam.co.uk/2012/01/11/alternating-listbox-item-background-colours-in-wp7/

Starting off well:

Starting good

After about 6 flicks of the scrollbar:

enter image description here

As you can see, pretty shocking, and it only gets worse and more separated. Thoughts?

  • 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-18T04:40:28+00:00Added an answer on June 18, 2026 at 4:40 am

    No bugs in windows phone, bugs in the crappy 3-rd party code you’re trying to use.

    Their approach is just completely wrong. No one guarantees the framework will call IValueConverter.Convert sequentially. And as you can see, when scrolling up and down the framework does call IValueConverter.Convert in arbitrary order.

    It might work only when the listbox doesn’t reuse its items (you can disable reusing by setting the listbox’ ItemsPanel property. By default, it uses VirtualizingStackPanel which causes your items to be reused. Replace it with regular StackPanel). But: (1) RAM usage (2) it still relies on undocumented behavior, may easily break with an OS upgrade.

    There’re many correct ways to implement what you want.

    You could e.g. add background color to your item class.

    Or, inherit from ListBox, override PrepareContainerForItemOverride method, in your implementation call ItemContainerGenerator.IndexFromContainer method to get the row index, and color ListBoxItem object however you want. Beware of 2 things (1) don’t forget to call base.PrepareContainerForItemOverride (2) Your changes to ListBoxItem’s properties may be overridden by visual state manager in the item container template.

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

Sidebar

Related Questions

I have an issue with Firefox when applying -moz-box-sizing : border-box; to inputs, seems
Seems to be a problem that many people have, but all the answers I
Seems like i need some help with a project. I have a routine ,
[SOLVED]: Applying proper list iteration procedure fixed problem. (Shown below) I currently have a
I have what seems like a simple problem, but searching the net hasn't yielded
I have a question regarding applying a custom function to mysql_fetch_assoc while it is
It seems that similar questions have been asked, but they don't quite fit what
I have a problem in applying a regex in my Java code. My text
I have an MVC 4 solution which I have been applying authorisation action filters
I have an interesting problem that seems to be eluding me. Mono's xsp4 only

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.