0

How can I make my Canvas.Settop command look like the image is moving there instead of just teleporting to it? I wan't to make it look like its just moving there. This is what I currently have: Canvas.SetTop(MarioCharacter, 454); And I've also tried this: WPF. Easiest way to move Image to (X,Y) programmatically? but this did not really end up working too great for me since it teleports the image to a random location and then just slides the image to its end point from there.

TL;DR: I need it so that the Canvas.Settop function looks like as if it would move the image to its end point.

peet214
  • 9
  • 4
  • 1
    [Animate](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/animation-overview?view=netframeworkdesktop-4.8?WT.mc_id=WD-MVP-5001077) the property instead of simply setting it. – mm8 May 19 '21 at 20:10
  • WPF has very useful animation features. You could do the animation yourself with an async method, but using the built-in features will generally produce better, smoother results. If you have trouble implementing a solution you've already seen, you should post a question that includes a [mcve] showing that attempt, along with a detailed explanation of what the code does, how that's different from what you want, and what _specifically_ you need help with. – Peter Duniho May 19 '21 at 20:15

0 Answers0