Hello
I have created a ListCollectionView property in my ViewModel (named DevicesListCollectionView) and this is the ItemsSource for a ListBox. Some of the properties have a TwoWay binding so that the user can change the values.
I have a 'HasDataChanged' Boolean property which I want to set if the user has changed any of the properties since the ListCollectionView was created.
I cannot seem to find a way to capture the ListCollectionView propertyChanged event so that I can set 'HasDataChanged' .
The Devices_ListCollectionView property 'setter' does not seem to be called when the user changes a value. I must be missing something simple but I can't see it.
Here is my ViewModel property:
Public Property DevicesListCollectionView() As ListCollectionView Get If m_DevicesListCollectionView Is Nothing Then m_DevicesListCollectionView = Me.AppData.DevicesListCollectionView End If Return m_DevicesListCollectionView End Get Set(ByVal value As ListCollectionView) m_DevicesListCollectionView = value 'Pass value back to AppData. Me.AppData.DevicesListCollectionView = m_DevicesListCollectionView 'Debug output. Console.WriteLine("DevicesListCollectionView set.") Me.HasDataChanged = True OnPropertyChanged("DevicesListCollectionView") End Set End Property
Any suggestions would be very welcome. Thank you.
Chris