Note that there are some explanatory texts on larger screens.

plurals
  1. USDonald Airey
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. COI wish to extend my apologies to devdigital. The discussion of a Repository was a red-herring, but his design is essentially correct. The View Model is created using DI, then the XAML code binds to exposed elements of the View Model. The XAML elements themselves should not, and can not, be given their own view models. I wanted to make the controls self-contained so they could be re-used, but this is unrealistic in an MVVM design. Best design is to make the control view models reusable, but they'll always need to be exposed through the owner view model.
      singulars
    2. COThe original poster has a valid question involving ListCollectionView and has already turned on virtualization. I am running into this same problem: the Refresh appears to recreate the items. I've already confirmed that virtualization is working by scrolling, but when I filter or sort using the view, WPF recreated all the items in the ListView.
      singulars
    3. COCharleh, how about posting that as an answer so we can vote on it. It looks good. In my mind, I was hoping for some re-usability out of the Customer combobox such that I could just drop the same control into any view and have it work. Your approach suggests that I create a re-usable collection of customers and pull it out of the container in each view model, then make it into a property of each view model that has such a combobox. Not as elegant as just dropping in a CustomerComboBox, but I see how it fits the DI architecture better.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload