Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1089
Data Binding To a View Model
posted

I'm trying to get up to speed on WPF and MVVM and as I have learned that I need to start using the model view view model pattern I've ran into what shoul dbe a basic problem with getting the xamGrid to display the data from the ViewModel.  I've recreated my issue in a small basic project that roughly implements MVVM.   I cannot get the grid to display anything and I cannot get the binding debugger to hit.

I must be missing something basic but have no idea what it is.

BindViewModel.zip
Parents
  • 54937
    Verified Answer
    Offline posted

    The problem is that you defined People as a field and not a property. e.g.

    //public ObservableCollection<Person> People;
    private ObservableCollection<Person> _people;
    public ObservableCollection<Person> People
    {
    get { return _people; }
    }

     

Reply Children
No Data