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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:10:20+00:00 2026-06-17T14:10:20+00:00

I have read the docs and tried many samples but to be honest the

  • 0

I have read the docs and tried many samples but to be honest the samples look like a big jumbled mess and don’t seem to make much sense.

Can anyone recommend any easy to follow tutorials or docs on how to style a ListView control in XAML? (Without Expression Blend)

  • 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-17T14:10:21+00:00Added an answer on June 17, 2026 at 2:10 pm

    The two main common tricks to styling a ListView are to style the items and change the kind of container the listbox uses to lay the items out.

    Styling an Item
    This basically means setting the ItemTemplate in xaml to something that knows how to dispay the thing that is the content of the listbox’s ItemsSource, typically using bindings.

    For example, if you have an ObservableCollection<Customer> bound to the listbox where customer is defined as:

    public class Order
    {
        public int Id { get; set; }
        public string OrderReference { get; set; }
        public string CustomerName { get; set; }
    }
    

    Then you might style the items with a data template as follows:

    <ListBox>
        <ListBox.ItemTemplate>
            <DataTemplate>
                <StackPanel>
                    <TextBlock Text="{Binding CustomerName}" />
                    <TextBlock Text="{Binding OrderReference}" />
                </StackPanel>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
    

    A basic example but you get the idea.

    Changing how items are laid out
    Essentially you might not want the default behaviour where items are listed vertically, so you can change the container control used inside the listbox to something more suitable using the ItemsPanel property. If, for example you had an item template that looked like an item from the “large icons” view in Windows Explorer, then you might want the listbox to use a WrapPanel rather than a StackPanel (I’m pretty sure it’s a StackPanel):

    <ListBox>
        <ListBox.ItemsPanel>
            <DataTemplate>
                <WrapPanel>
                    <ContentPresenter />
                </WrapPanel>
            </DataTemplate>
        </ListBox.ItemsPanel>
    </ListBox>
    

    Again a basic example.

    I wrote all this code from memory into StackOverflow so apologies if there are a few typos or mis-remembered bits in there.

    HTH.

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

Sidebar

Related Questions

I read the docs and installed lithium exactly like they have explained but I
I have read the docs and everything but I'm very confused. I never needed
I've read some docs about the .NET Garbage Collector but i still have some
This may sound very noobish but I have tried to read the forum posts
I have read the Django documentation (For reference, https://docs.djangoproject.com/en/1.3/intro/tutorial01/ ), but I'm still having
I have read a lot of post and tried a lot of things but
i have searched google, tried to read adhearsion docs and make sense of the
I have read the Adobe's docs Using FXG and Embedding application assets , but
I have read a load of the FB docs but I still can't get
I have read all the docs I can get my hands on and google'd

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.