Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User molbal's Avatar
    Join Date
    Apr 2008
    Location
    Budapest, Hungary
    Posts
    56
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,743
    Side ideas: does it also happen in the emulator? Can it happen that a software update cures the problem?

  3. #3
    Registered User molbal's Avatar
    Join Date
    Apr 2008
    Location
    Budapest, Hungary
    Posts
    56
    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 chintandave_er's Avatar
    Join Date
    Aug 2008
    Location
    Vadodara, India.
    Posts
    787
    Then It should be some kind of bug in listbox control (from Microsoft).
    Chintan Dave.
    Water Bubble Application for Nokia N9 is now available in Nokia Store.
    World's Greatest Speeches for Windows Phone is now available in WP Marketplace.

  5. #5
    Nokia Developer Moderator joaocardoso's Avatar
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    560
    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.
    Cheers

    João Cardoso

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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved