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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:07:32+00:00 2026-05-20T18:07:32+00:00

I have those two classes: class DownloadLink { public string Name { get; private

  • 0

I have those two classes:

class DownloadLink
{
    public string Name { get; private set; }
    public string Url { get; private set; }
    //(...)
}

class DownloadGroup
{        
    public List<DownloadLink> Links { get; private set; }
    //(...)
}

class Manager
{
    public List<DownloadGroup> Groups { get; private set; }
}

Manager managerOBJ = new Manager();

I want to display this like that:

Everything will be in ListBox:
I wan to bind managerOBJ.Groups to that ListBox. – How to do it?
Than I want to create DataTamplate to display each group and all links in that group. – How to do it?

I want to do as much as possible from XAML

UPDATE:

This is what I got. It’s not workig. List box is empty.

    <ListBox DockPanel.Dock="Right" VerticalAlignment="Stretch" Width="500" HorizontalAlignment="Right" Background="#FFE1FFF5" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible" ItemsSource="{Binding Path=Groups}" Name="GroupsListBox">
        <ListBox.ItemTemplate>
            <DataTemplate>
                <StackPanel Height="30" VerticalAlignment="Top" Width="500" >
                    <Grid Height="Auto" Width="500">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Label Content="XX MB w XX plikach" HorizontalAlignment="Stretch" Margin="0"/>
                    </Grid>
                    <ListBox HorizontalAlignment="Stretch" Height="43" Margin="0,5,0,0" Width="Auto" VerticalAlignment="Top" ItemsSource="{Binding Path=Links}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Label Content="{Binding Path=Name}" />
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </StackPanel>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>

and in code behid I have:

RapideoAccount = new Rapideo();
GroupsListBox.DataContext = RapideoAccount;
  • 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-20T18:07:33+00:00Added an answer on May 20, 2026 at 6:07 pm

    The whole manager is contained in a listbox, for each downloadgroup in the manager you add an itemscontrol that contains another items control with the links in it.
    This can be done by using DataTemplates:

        <ListBox Name="myGroups"
             ItemsSource="{Binding Path=Groups}">
        <!-- each List<DownloadGroup> in the manager: -->
        <ListBox.ItemTemplate>
            <DataTemplate>
                <ItemsControl ItemsSource="{Binding Path=Links}">
                    <!-- each Link in the Downloadgroup -->
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBlock Text="{Binding Path=Name}" />
                                <TextBlock Text="{Binding Path=Url}" />
                            </StackPanel>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
    

    In code you would put:

    Manager managerOBJ = new Manager();
    myGroups.DataContext = managerOBJ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have those two classes ///////////BASE CLASS class Base{ public: Base(int = 0); ~Base();
I have a class that contains two methods like these: public String getFoo(Int32 a)
I have two ActiveRecord classes class Product : ActiveRecordBase<Product> { private IList<Usage> _usages =
Say that I have two tables like those: Employers (id, name, .... , deptId).
If I have those two classes that have two different properties but with the
Suppose I have two classes in a Rails application: class Subject < ActiveRecord::Base def
We have two classes that have the exact same public accessors (and many of
Suppose I have a dataset with those two immortal tables: Employee & Order Emp
In a WCF service, I have two classes with the [DataContract] attribute. One of
I'm struggling to get association right on Grails. Let's say I have two domain

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.