/** * Attaches a change listener to the model state item and raises a property changed notification when that happens. * * @param $propertyName * @param ModelState $item */ private function attachChangeListenerToModelProperty($propertyName, ModelState $item) { $item->clearEventHandlers(); $item->attachEventHandler("AfterChange", function () use($propertyName, $item) { $this->raisePropertyChangedCallbacks($propertyName, $item, null); }); }