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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:54:20+00:00 2026-05-20T11:54:20+00:00

Is it possible to group items in a ItemsControl or Listbox in Silverlight? These

  • 0

Is it possible to group items in a ItemsControl or Listbox in Silverlight? These controls are bound to a DomainDataSource.

Or are there any 3rd party controls that do this?

UPDATE:

This is the sort of UI I am trying to create.

alt text

  • 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-20T11:54:20+00:00Added an answer on May 20, 2026 at 11:54 am

    You can do this by using nested ItemsControls bound to a PagedCollectionView.

    Say I have a datasource – MyItems – with fields: Category, Section and Option. I can create a PagedCollectionView from an IEnumerable(of MyItems) and tell it which fields to group by.

    Dim original As IEnumerable(Of MyItems) = GetMyItems()
    
    Dim pcv = New PagedCollectionView(original)
    
    pcv.GroupDescriptions.Add(New PropertyGroupDescription("Category"))
    pcv.GroupDescriptions.Add(New PropertyGroupDescription("Section"))
    

    Then I bind my first ItemsControl to the PagedCollectionView

    hisMyItems.ItemsSource = pcv.Groups
    

    The PCV creates a nested hierachy like:

    -Name
        -Items
    

    where Name is the value in the grouped field and Items contains the rows/objects in that grouping. I guess you could also create the PCV in xaml if you prefer.

    The xaml would look something like:

    <controls:HeaderedItemsControl x:Name="hisMyItems" Header="{Binding Name}" ItemsSource="{Binding Items}" >
        <controls:HeaderedItemsControl.ItemTemplate>
            <DataTemplate>
    
                <controls:HeaderedItemsControl Header="{Binding Name}" ItemsSource="{Binding Items}" ItemsPanel="{StaticResource ItemsPanelTemplate1}" >
                    <controls:HeaderedItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Button Content="{Binding Option}" />
                        </DataTemplate>
                    </controls:HeaderedItemsControl.ItemTemplate>
                </controls:HeaderedItemsControl>
    
            </DataTemplate>
        </controls:HeaderedItemsControl.ItemTemplate>
    </controls:HeaderedItemsControl>
    

    I hope that makes sense. I have tried to simplify things from my actual app but I could have made some mistakes in copying it over. Obviously you could use normal ItemsControls or other controls too and customize with templates etc.

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

Sidebar

Related Questions

I'm trying to come up with the largest possible group of friends that would
Is it possible using Linq to create a group where items fall into more
I'm using a ListView control to group items, so that the page can display
Is it possible using XSLT to group items in an XML file? Input file:
I have a ListBox that can contain hundreds of items. I've added the following
I have an ItemsControl with a GroupStyle defined in order to group my items
It is possible to group some fields in the edit form? I would like
Possible Duplicate: SQL ORDER BY total within GROUP BY UPDATE: I've found my solution,
Possible Duplicate: Linq - Top value form each group I have data in the
Possible Duplicate: Retrieving the last record in each group I have two tables set

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.