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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:06:09+00:00 2026-06-05T11:06:09+00:00

In my Windows Phone application I have a listBox with ContentItems binding : private

  • 0

In my Windows Phone application I have a listBox with ContentItems binding :

private ObservableCollection<ContentItemViewModel> _contentItems;

public ObservableCollection<ContentItemViewModel> ContentItems
{
    get { return _contentItems; }
}
 <ListBox x:Name="ContentListBox"   Margin="0,117,12,0"  VirtualizingStackPanel.VirtualizationMode="Standard" Logic1:TiltEffect.IsTiltEnabled="True" ItemsSource="{Binding ContentItems}"   Tap="ContentListBox_Tap" MinHeight="656"  >
    <ListBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="vertical" >
                <Grid Height="{Binding ItemHeight}" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Image   Grid.Column="0"  x:Name="itemIco1"  Width="Auto" Height="Auto" HorizontalAlignment="Left" Source="{Binding IconURL}" Stretch="Fill" CacheMode="BitmapCache" VerticalAlignment="Top" Margin="5,5,5,5" Visibility="Visible"/>
                    <ListBox IsHitTestVisible="False" Grid.Column="1"  VerticalAlignment="Center"  >
                        <ListBox.ItemContainerStyle>
                            <Style TargetType="ListBoxItem">
                                <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                            </Style>
                        </ListBox.ItemContainerStyle>
                        <TextBlock x:Name="ContentCategoryTitle" Height="70" Text="{Binding ContentTitle}" Width="460"  Margin="5,34,0,0"  TextTrimming="WordEllipsis" TextWrapping="NoWrap"    FontSize="28" FontFamily="Segoe WP Semibold"   Foreground="#FFF7F7F7"  VerticalAlignment="Bottom" />
                    </ListBox>
                </Grid>
                <Rectangle Fill="#FF585858" Height="1" Margin="0,0,0,0"  Width="460" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
            </StackPanel>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>

Is it possible to binding not an ObservableCollection<ContentItemViewModel>, but – ObservableCollection<List<ContentItemViewModel>> ?

  • 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-05T11:06:10+00:00Added an answer on June 5, 2026 at 11:06 am

    Yes that is possible, if you have a collection of collections. Or why not this?

    ObservableCollection<ObservableCollection<ContentItemViewModel>>
    

    If you want your UI to be notified of collection changes to your sub collections.

    Update

    For example:

    View Model

    public ObservableCollection<ObservableCollection<ContentItemViewModel>> ContentItems
    {
       get { return _contentItems; }
       set { _contentItems = value; // Notify of property change here, this allows you to change the ContentItems reference after view model construction }
    }
    
    public MyViewModel()
    {
        // Populate content items
        this.ContentItems = new ObservableCollection 
              {
                  new ObservableCollection { new ContentItemViewModel() },
                  new ObservableCollection { new ContentItemViewModel(), new ContentItemViewModel() }
              };
    }
    

    View

    <ListBox ItemsSource="{Binding ContentItems}" ...>
       <ListBox.ItemTemplate>
          <DataTemplate>
             <Grid>
                <ListBox ItemsSource="{Binding}">
                   <ListBox.ItemTemplate>
                     <DataTemplate>
                        <Grid>
                           <TextBlock Text="{Binding MyContentItemViewModelProperty}" />
                        </Grid>
                     </DataTemplate>
                   </ListBox.ItemTemplate>
                </ListBox>
             </Grid>
          </DataTemplate>
        <ListBox.ItemTemplate>
     </ListBox>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a Windows Phone 7 Silverlight application, I have this ListBox: <ListBox ItemsSource={Binding Path=Programs}
iHi, in my Windows Phone application in View I have: <TextBlock x:Name=lblink FontSize=15 Margin=30,0,24,0
net to make a Windows Phone application. I have a listBox on page1 called
I'm developing a Windows Phone application. I have defined a ListBox.ItemTemplate's DataTemplate as follows:
I have published an Windows phone 7 application to marketplace through Private Beta Test
Windows Phone application (Silverlight 3) I have a textblock <TextBlock Text={Binding Key} FontSize=40 Foreground={Binding
I'm developing a Windows Phone application with C#. I have an ObservableCollection defined as
All, I have a basic Windows 7 Phone application and I have just finished
Thanks in advance.. I have a windows phone application. In that I am showing
I have a multi page windows phone application. I have a main page and

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.