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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:24:24+00:00 2026-05-27T05:24:24+00:00

I was answering another question on here where the user had a ListView with

  • 0

I was answering another question on here where the user had a ListView with an ItemsSource containing UserControls. I said I wouldn’t recommend it, and got asked why.

This really surprised me. I’ve never considered it before. I know it’s not a good idea to do so, but I never really thought about why it wasn’t a good idea to do so.

The only thing I can think of is that you are creating UIElements in memory for every item in your collection, which can be much heavier than data objects. This not only increases the memory your application uses, but also prevents you from using Virtualization. And it doesn’t fit in with the MVVM design pattern, which I use almost religiously when working with WPF.

So, can someone list me all the reasons you should not be using a list of UserControls as an ItemsSource? Or if you think otherwise, why you would?

Basically I want something to point people to when they ask me why they shouldn’t use List<MyUserControl> and ItemsSource="{Binding MyUserControlList}" in their applications.

  • 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-27T05:24:25+00:00Added an answer on May 27, 2026 at 5:24 am

    Your points about performance overhead are very good.

    I would ask the converse question….why WOULD you want to?

    I’ve seen this practice in VB6 in the past. The developer stores information in user controls in an array somewhere and uses it to access information outside the lifetime on the UI which initially displays that control.

    This pattern violates the separation of business logic, model, and user interface.

    There’s a fine line between being lazy and being sloppy….reuse and misuse. I’m all about code reuse…but when a developer tells me they want to use user controls to carry information between different areas of the software, I think that falls on the side of misuse. It adversely affects maintainability.

    So, if the answer to “why would you want to?” has something to do with using user controls to pass around information, the above would certainly apply.

    P.S.
    It’s unclear to me what the intent was in the question you linked to. Also, there are valid reasons to binding to other UI elements in the same context (usually using relative binding sources).

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

Sidebar

Related Questions

In answering another persons question here on SO, I discovered that there is a
This came up when answering another user's question (TheSoftwareJedi)... Given the following table: ROW_PRIORITY
Thank you to Yuji for answering another question I had and pointing me to
When answering another question I started to wonder how I could Add new properties
In answering this question ( https://stackoverflow.com/questions/352317/c-coding-question#352327 ), it got me wondering... Is there any
In answering this question , it got me thinking... I often use this pattern:
As part of answering another question, I came across a piece of code like
This question arose when I was working on answering another question about best practices
While answering another question, I thought of the following example: void *p; unsigned x
The question arose when answering to another SO question ( there ). When I

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.