Combo box does not update

Eduardo Gomez 4,276 Reputation points
2022-06-22T19:30:58.93+00:00

Hello

I am building a wpf app, using MVVM (I already imported MVVM.Helpers)

I am trying to fill a list with 5000 numbers, and put in in a commbo box, and for some reason is not working

my app: https://github.com/eduardoagr/RsidentsManager

I have a BaseViewModel, and every ViewModel I have inherit from that base

<ComboBox  
                materialDesign:HintAssist.Hint="Rooms" materialDesign:HintAssist.IsFloating="True" ItemsSource="{Binding Rooms}"  
                IsReadOnly="True" />  

VM

    public class PrpertiesWindowViewModel : BaseViewModel {  
  
        public List<int> Rooms { get; set; }  
  
        public PrpertiesWindowViewModel() {  
  
            Rooms = new List<int>();  
            FillList();  
  
        }  
  
        private void FillList() {  
  
            for (int i = 1; i < 5000; i++) {  
                Rooms.Add(i);  
            }  
        }  
    }  

if you run you do not see anything is like the list dosent get filled

Developer technologies | Windows Presentation Foundation
Developer technologies | XAML
Developer technologies | XAML

A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    2 deleted comments

    Comments have been turned off. Learn more