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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:28:11+00:00 2026-05-19T10:28:11+00:00

I noticed a very strange behavior: in my windows phone 7 I have a

  • 0

I noticed a very strange behavior:
in my windows phone 7 I have a ListBox that can contain anything from 1-2 to 2-300 items.
I noticed that when the number of items is big (not sure about the number but for sure >150 items) the OnSelectionChanged event is not raised.

This is the XAML of my listbox

<ListBox ItemsSource="{Binding Path=Posts}" ItemTemplate="{StaticResource IconsWithText}"
        ScrollViewer.VerticalScrollBarVisibility ="Disabled"
        SelectionChanged="ListBox_SelectionChanged" >
    <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <StackPanel Orientation="Horizontal" />
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
</ListBox>

And the template for the ItemTemplate is:

<DataTemplate x:Name="IconsWithText">
    <Grid x:Name="ThumLink"  Width="160" Height="140" Margin="10" Background="#FF666666">
        <Image Source="Resources/Images/All.png" Visibility="{Binding Path=VisibilityAll}" />
        <Image delay:LowProfileImageLoader.UriSource="{Binding Picture}"
                Visibility="{Binding Path=VisibilityPic}"
                Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" />
        <Border x:Name="border" VerticalAlignment="Bottom" Background="#d9ffffff" Height="62" BorderBrush="Black" Visibility="{Binding Path=VisibilityPic}"  >
            <TextBlock x:Name="textBlock" Text="{Binding Title}" VerticalAlignment="Top" TextWrapping="Wrap" MaxHeight="60" Style="{StaticResource PhoneTextSmallStyle}"
                Foreground="Black" FontSize="20" Margin="4,1,4,0" Height="62"/>
        </Border>
    </Grid>
</DataTemplate>

Is this a bug or did I do something wrong? I was in debug and the event handler never gets called, but it works when the items are not many.

Simone

  • 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-19T10:28:12+00:00Added an answer on May 19, 2026 at 10:28 am

    The problem with using the plain StackPanel is that all visual object will be created and added to the StackPanel which will be very expensive in terms of memory and may trip over other limits in the rendering system.

    Try changing to:-

    <VirtualisingStackPanel Orientation="Horizontal" />
    

    So far though I’ve not been able to reproduce your problem with 300 items even using a plain StackPanel.

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

Sidebar

Related Questions

I have been away from ruby for awhile and I noticed something very strange
I noticed very strange behavior of my program today. Basically I have JToolBar uder
I have switched on the Codeigniter profile (very useful) and I have noticed that
While creating the sample, I noticed very strange behavior and due to which I
While writing script I noticed some very strange Perl behavior. The task is to
I am using FileWriter and I have noticed strange behavior. I buffer my collection
I've noticed some very strange behaviour today in Code Igniter. I have this locations
So I've noticed some very weird behaviour from my program. Here's a simplified code
I noticed that JavaScript's new Date() function is very smart in accepting dates in
I noticed that IE 9 does not support application cache. How can I use

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.