classdef (ConstructOnLoad) PropertyValueChangedEvent < event.EventData
    % PropertyValueChangedEvent bundles the pre-set and post-set values
    % into an event, which cannot be achieved directly with Observable
    % properties
    properties (SetAccess = immutable)
        PropertyName(1,1) string
        PreSetValue
        PostSetValue
    end

    methods
        function obj = PropertyValueChangedEvent(propName, preSetValue, postSetValue)
            obj.PropertyName = propName;
            obj.PreSetValue = preSetValue;
            obj.PostSetValue = postSetValue;
        end
    end
end