I have been struggling a bit with ProWindows and Data Binding. For some background, I am trying to implement a ProWindow and I have:
- Created a separate ViewModel that inherits PropertyChangedBase
- Set the data context properly in my code behind
- Tried to bind data to update a public boolean property that is set with PropertyChangedBase.SetProperty() to change the IsSelected value of multiple TreeViewItems that are bound in the following way:
IsSelected="{Binding AllDataSourceSelectedState, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
- I have also implemented a custom type which implements INotifyPropertyChanged so that I can reduce the code clutter for properties and tried using this instead as a second option. (this works absolutely fine in dockpanes)
This boolean is being changed on a mouse up event. I have stepped through the debugger and ensured it is changing and that the property changed event is happening. I have even manually called NotifyPropertyChanged with no luck. It seems like no matter what I do, I cannot get data to bind to a ProWindow after the initial loading of the window. I have tried so many things. Dockpanes on the other hand work awesome for binding data.
I have already looked at the community sample for ProWindows MVVM and I didn't find it very helpful for my situation. Any advice would be appreciated. Thanks in advance.