×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2008
    Location
    Budapest, Hungary
    Posts
    56

    Question Strange ListBox scrolling (random empty lines inserted at ends)

    Hello,
    I have a really strange issue with a ListBox scrolling. When scrolling fast, or more times random entries are being inserted at the ends of the list. I have tried to set the virtualization mode to recylcing (to enable cache). I have taken a video of the error: http://www.youtube.com/watch?v=qSRi30P3loM

    Here is the XAML Code:
    Code:
    <ListBox VirtualizingStackPanel.VirtualizationMode="Recycling" Height="573" HorizontalAlignment="Left" Name="listBox" VerticalAlignment="Top" Width="456" DataContext="{Binding}" ItemsSource="{Binding}" Margin="0,-22,0,0" Grid.ColumnSpan="2">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <TextBlock Text="{Binding Name}" FontSize="38" />
                                <TextBlock Text="{Binding Group}" FontSize="22" Margin="10,42,-10,-30" />
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
    Here is the C# part where I fill the list:
    Code:
                byte[] xmlByteArray = Encoding.UTF8.GetBytes(xml);
                MemoryStream xmlStream = new MemoryStream(xmlByteArray);
                XDocument loadedData;
                if (xmlStream != null)
                {
                    loadedData = XDocument.Load(xmlStream);
    
                }
                else
                {
                    MessageBox.Show("Something went wrong, sorry");
                    return 0;
                }
                var data = from query in loadedData.Descendants()
                           select new EwalletList
                           {
                               Name = DecodeFrom64((string)query.Element("name")),
                               Value = DecodeFrom64((string)query.Element("value")),
                               Group = DecodeFrom64((string)query.Element("group"))
    
                           };
                listBox.ItemsSource = data;
                return 1;
    DecodeFrom64 is a string to string function where I decode a base64 encoded string.

    I would appreciate any help,
    Thanks,
    Bálint

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,567

    Re: Strange ListBox scrolling (random empty lines inserted at ends)

    Side ideas: does it also happen in the emulator? Can it happen that a software update cures the problem?

  3. #3
    Registered User
    Join Date
    Apr 2008
    Location
    Budapest, Hungary
    Posts
    56

    Re: Strange ListBox scrolling (random empty lines inserted at ends)

    Quote Originally Posted by wizard_hu_ View Post
    Side ideas: does it also happen in the emulator? Can it happen that a software update cures the problem?
    Well, I changed nothing but the problem is resolved. (Im emutator, too). I cannot reproduce the problem any more, neither in emulator or on-device. Miracles!

  4. #4
    Nokia Developer Champion
    Join Date
    Aug 2008
    Location
    Vadodara, India.
    Posts
    903

    Re: Strange ListBox scrolling (random empty lines inserted at ends)

    Then It should be some kind of bug in listbox control (from Microsoft).
    Nokia Developer Wiki Moderation team
    World's Greatest Speeches for Windows Phone is now available on WP Marketplace.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    919

    Re: Strange ListBox scrolling (random empty lines inserted at ends)

    Quote Originally Posted by chintandave_er View Post
    Then It should be some kind of bug in listbox control (from Microsoft).
    If you get to replicate the issue again I would recommend filling a bug report on connect at Microsoft. If you can include a project sample.

Similar Threads

  1. problm in 3 lines listbox..
    By poojs in forum Symbian User Interface
    Replies: 3
    Last Post: 2010-08-02, 06:15
  2. listbox empty
    By rohitnegi in forum Symbian User Interface
    Replies: 8
    Last Post: 2010-02-25, 05:34
  3. Lines between listbox rows
    By andrii in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-11-02, 20:39
  4. Weird Lines when showing ListBox
    By ViruDoshi in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-12-16, 01:47
  5. items lines in ListBox
    By MuSymbian in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-09-14, 04:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •