Recorded several animations. And you need to, for example, when you press a button, a certain animation is performed. Did it.

And how to make, what would depending on certain values, this or that animation was played, that is, if for example the value of the label is "takoeto", then we lose this animation, and if "such and such", then something else, etc. ? Is it done with a converter? or how? if someone knows, please write the code.

    1 answer 1

    I do not see the need for any converters here. You need to define your event when your label changes. Then, in the procedure for handling this event, write logic that will implement your plan, for example:

    void metka_changed(object sender, Event__ e) { string s = metka.Text; switch (s) { case "metka1": {animation1(); break;} case "metka2": {animation2(); break;} } }

    The animation itself can be implemented in code (see the animation help) or you can create a set of animation in the application resources, and then load it from the resources and attach it to the desired properties. If you look for the implementation in XAML, then it can be so confusing and huge that I'm afraid you can not cope. Although, if you are not afraid of numerous and deep tags, you can still implement it via XAML, but this, I think, does not make sense (just kill time and get neither flexibility nor beauty).