Difference between "Change" and "Set"

According to the documentation, “Change Class” means “Temporarily changes the value of a property while its containing trigger is active.”, and “Set Class” means “Permanently changes the value of a property.” I am not very sure what does that mean to the animation, as the CSS style is by definition stateful and bind to an observable, change temporarily or permanently both just mean change an observable. Do you mean that “Set” is the final state whilst the “Change” is the state involved in transition?

Hi clifflo.the.diskjockey,

when the containing trigger deactivates, the property affected by Change will animate back to its “rest state” - the value it initially had. A property affected by Set will retain the value set.

Consider the following:

    <Change myRectangle.Opacity="0.5" />
    <Set myRectangle.Color="#f00" />

The myRectangle rectangle will only be half-transparent while it’s pressed and go back to initial opacity value when released. However, it will become red while it’s pressed and will stay red even after released.

Hope this helps!