Quantcast
Channel: Silverlight Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 801

Closed Issue: LongListSelector: Adding items to empty category creates a duplicate category [7650]

$
0
0
Hi,

I noticed that if you have an empty category, and you add items to it, it will create a duplicate category, add the items to that category, and leave the original empty category alone.

To repro this issue, just use the following setup:

<controls:PivotItem Header="code">
<toolkit:LongListSelector x:Name="codeMovies" Background="Transparent" DisplayAllGroups="True"
ItemsSource="{StaticResource movies}"
ListHeaderTemplate="{StaticResource movieListHeader}"
GroupHeaderTemplate="{StaticResource movieGroupHeader}"
GroupItemTemplate="{StaticResource groupItemHeader}"
ItemTemplate="{StaticResource movieItemTemplate}">

public MoviesByCategory()
{
List<string> sortedCategories = new List<string>(Movie.Categories);
sortedCategories.Sort();

foreach (string category in sortedCategories)
{
MoviesInCategory group = new MoviesInCategory(category);
this.Add(group);
/*
for (int i = 0; i < 5; ++i)
{
group.Add(Movie.CreateRandom(category));
}
*/
}
}

public void Execute(object parameter)
{
MoviesInCategory group = parameter as MoviesInCategory;
if (group != null)
{
for (int i = 0; i < 5; i++)
{
group.Add(Movie.CreateRandom(group.Key));
}
}
}

Thanks.
Comments: Closing fixed issues.

Viewing all articles
Browse latest Browse all 801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>