I’m either doing something wrong(certainly possible) or there is a bug in the IObservableVector. I wrote a ViewModelBase class that handles property changed events as well as some other common properties one of which is an IObservableVector. The vector is used to bind to a Xaml navigation view for the menu items source. At startup I fill the collection and everything works as expected. I have a click handler in the application that is handled in a derived ViewModel that tries to loop over the collection to find a particular item. The problem is the property is a valid object but it seems to be empty. Size is reported as 0 and when I try to get an item I know is there there is an exception. I’ve tried making the viewmodelbase class both a runtime class and a regular old c++ struct. Same behavior in both cases. I’ve tried casting the derived to a base as well as many other things. Am I missing something? If this is not the right repo, happy to open an issue in the right place.
Version
Latest available with vs 2022
Summary
I’m either doing something wrong(certainly possible) or there is a bug in the IObservableVector. I wrote a ViewModelBase class that handles property changed events as well as some other common properties one of which is an IObservableVector. The vector is used to bind to a Xaml navigation view for the menu items source. At startup I fill the collection and everything works as expected. I have a click handler in the application that is handled in a derived ViewModel that tries to loop over the collection to find a particular item. The problem is the property is a valid object but it seems to be empty. Size is reported as 0 and when I try to get an item I know is there there is an exception. I’ve tried making the viewmodelbase class both a runtime class and a regular old c++ struct. Same behavior in both cases. I’ve tried casting the derived to a base as well as many other things. Am I missing something? If this is not the right repo, happy to open an issue in the right place.
Reproducible example
Expected behavior
No response
Actual behavior
No response
Additional comments
No response