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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:30:07+00:00 2026-06-09T17:30:07+00:00

New to the WPF world and need to implement a dynamic column view. I

  • 0

New to the WPF world and need to implement a dynamic column view.

I can conceptually visualize the idea, but am not able to turn this into an implementation.

StackPanel -> ListView -> Textboxes.

The whole idea is to display profiles as columns for a selected entity, based on the entity selected, the profiles can change, so I want to display profiles as dynamic columns.
A Profile will have 54 items, which can be represented as a textbox vertically.

So if i have an observable collection that represents the profile items (54 items), when bound to a usercontrol and user control loaded into the listview vertically.

So each profile added will be added horizontally on the stack panel, so i can get all profiles as dynamic columns.

Any ideas or pointers on how i can implement this via xaml, and how should my model objects should look like ?

Hope i have put my idea across properly 🙂

** adding a very quick hand sketch of whats required.

The columns col1..col2….. are ideally a collection that has the data to be displayed in the textboxes denoted by the rectangle boxes inside the column.

Each colum across can be varied.

so the data I get from my service ideally is a Collection of Collection.

so The first collection contains the Col1..Col2..Col3… items…

At first thought this sounds very much like a grid, but the datamodel does not fit a grid display style.

Each of those Col1..col2..col3 is inside the first collection as another collection.enter image description here

  • 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-09T17:30:08+00:00Added an answer on June 9, 2026 at 5:30 pm

    I have managed to solve the layout and display of the data as required above, thanks to SO and a mix and match of various answers got me this.

    So the below XAML creates any number of listitems horizontally.

    <Grid x:Name="LayoutRoot" Background="White">
        <StackPanel Height="301"  HorizontalAlignment="Left" Margin="37,42,0,0" Name="stackPanel1" 
                    VerticalAlignment="Top" Width="795">
            <StackPanel.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0" />
                    <GradientStop Color="White" Offset="1" />
                    <GradientStop Color="Silver" Offset="0.006" />
                </LinearGradientBrush>
            </StackPanel.Background>
    
            <ItemsControl x:Name="tStack" Grid.Column="0" ItemsSource="{Binding Profiles}" >
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid HorizontalAlignment="Left">
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Button Grid.Row="0" Content="{Binding Name}"/>
                            <ListBox Grid.Row="1" Height="209" Name="listBox1" Width="98" HorizontalAlignment="Left"
                                ItemsSource="{Binding Path=Profile, Mode=TwoWay}"/>
                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </StackPanel>
    </Grid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to WPF but I need to implement following functionality: I have a
While designing a new WPF application I noticed exceptions not being thrown during data
Hi all i need help wih my combobox. Iam quite new in the WPF
New to WPF and also the ObservableCollection I need to sort it in my
I need to make a water fountain animation. But I'm not a designer, I'm
I've been using Windows Forms for years, but I'm relatively new to WPF. I
New to programming and need a little assistance. I have a WPF usercontrol used
I'm relatively new to the WPF world and I'm working on an application where
I'm quite new to the WPF world and I'm having some problems with templating
I am new in WPF, and I am working with DataGrids and I need

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.