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

  • Home
  • SEARCH
  • 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 8346247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:56:54+00:00 2026-06-09T06:56:54+00:00

In silverlight is databinding to collection<*> allowed ? Because i did the below and

  • 0

In silverlight is databinding to collection<*> allowed ? Because i did the below and nothing happens

<SilverlightToolkit:Accordion Name="ToolboxCategories" SelectionMode="ZeroOrMore">
                <SilverlightToolkit:Accordion.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}"></TextBlock>
                    </DataTemplate>
                </SilverlightToolkit:Accordion.ItemTemplate>
                <SilverlightToolkit:Accordion.ContentTemplate>
                    <DataTemplate>
                        <ListBox x:Name="CategoryControls" ItemsSource="{Binding States}" BorderThickness="0">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <Canvas>
                                        <TextBlock Text="{Binding Name}"></TextBlock>
                                    </Canvas>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </DataTemplate>
                </SilverlightToolkit:Accordion.ContentTemplate>
            </SilverlightToolkit:Accordion>

Where Country is class that contains States property that is of type Collection<State>

Country

Public Class Country
{
  Public Collection<State> States;

  Public string Name{get;set;}
}

State

Public Class State
{
  Public string Name{get;set;}
}

Xaml.cs

List<Country> countries = DAL.GetCountries();

ToolboxCategories.ItemSource = countries;

note:
I see that the accordian header shows the country name in each accordian header, but then Listbox is not databound with states.

  • 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-06-09T06:57:01+00:00Added an answer on June 9, 2026 at 6:57 am

    Please make States as full property and this will work.

     public class Country
    {
        public Collection<State> States { get; set; }
    
        public string Name { get; set; }
    }
    

    Because when you set the Binding internally it looks for get_Property method of the object and you didn’t make state as property that is why it is not showing. I hope this will help you to get rid of this issue.

    Cheers!
    Vinod

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

Sidebar

Related Questions

How do you Clear/Remove DataBinding in Silverlight? similar to: Remove binding in WPF using
I have simple issue setting a two-way databinding of a checkbox in Silverlight 3.0.
I have some issues with using databinding in silverlight 4 xaml pages, this is
I am trying to use databinding to bind data to a Silverlight toolkit chart.
Databinding in WPF/Silverlight revolves around dependency properties, DataContext objects and DataSource objects. As far
Maybe this is a dumb question because I just started to work with silverlight.
I am a newbie in this Silverlight Databinding subject. I am starting to understand
I've started using databinding with MVVM pattern in Silverlight. There's one problem for me.
How does two-way databinding work in Silverlight when the data source object's properties don't
I have a Silverlight 4 MVVM app that uses databinding to boolean properties like

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.