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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:22:26+00:00 2026-06-12T18:22:26+00:00

Hi I am trying to create 3 columns in a ListView. I read this

  • 0

Hi I am trying to create 3 columns in a ListView.

I read this but I want to set the data in each column programtically in C#:

how to display data in rows and columns XAML windows 8

For example I want artist name, song name and artist.

  • 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-12T18:22:28+00:00Added an answer on June 12, 2026 at 6:22 pm

    Assuming you have something like this to store your data:

    public class SongDetails
    {
        public string ArtistName {get; set;}
        public string SongName {get; set;}
        public string Artist {get; set;}
    }
    

    And a ListView with a DataTemplate defined (as in the link you provided), just give your ListView a name:

    <ListView Name="ListViewSongs">
        <ListView.ItemTemplate>
            <DataTemplate>
                <Grid Width="500" VerticalAlignment="Center">
    
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="150" />
                    </Grid.ColumnDefinitions>
    
                    <TextBlock Grid.Column="0" Text="{Binding Artist}" />
                    <TextBlock Grid.Column="1" Text="{Binding ArtistName}" />
                    <TextBlock Grid.Column="2" Text="{Binding SongName}" />
                </Grid>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>
    

    Then, from the code-behind, it’s just a case of:

    var songDetails = new[]
        {
            new SongDetails {Artist = "a1", ArtistName = "a2", SongName = "a3"},
            new SongDetails {Artist = "b1", ArtistName = "b2", SongName = "b3"}
        };
    
    ListViewSongs.ItemsSource = songDetails;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to create a TableLayout dynamically. I want to create rows and columns
Im trying to create a Spinners within a ListView, but i dont know how
I am trying to separate different columns of data that appear in my listview.
I am trying to create 2 columns. One column will carry the users details..Avatar
I'm trying to create a two columns layout where there is one column floated
I'm trying to create a series of bound columns in a RadGridView, and I'm
I am trying to create a table where one of the columns has a
I'm trying to create a check on a few columns in my database that
I am trying to create a nice column list in python for use with
I'm basically trying to create a 2 column div with a liquid <h1> 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.