I got this Data Structure:
12 Measurements, each Measurement contains 1-x Cells, each Cell contains 1-x Stations. The Amount of Cells/Stations is the same for each Measurement.
Therefore i have a Measurement, a Cell and a Station Class. Each of these 3 implement the ObservableObject Class.
In my View i create a Itemscontrol for each Measurement to display all Cells of a Measurement. Each Item contains an Itemscontrol to display all the Stations in Textboxes.
Now i need a 13th Measurement in which i calculate the sums from each station across all Measurements. (Station 1 from Cell 1 from all 12 Measurement).
Currently my Viewmodel only contains a Observable Collection with the 12 Basic Measurements.
How can i detect if a Value of a Station-Textbox is changed and what Station has been changed?
You could latch onto the
PropertyChangedevent for each Station in the ViewModel. This is an event handler inObservableObjectthat is triggered whenever a property is modified (part of theINotifyPropertyChangedinterface).