Transition of images in Windows Forms Picture box

前端 未结 4 894
囚心锁ツ
囚心锁ツ 2020-12-11 22:27

I\'m new to Windows Forms, in my project, i need to change the image in the picture box at runtime. I\'m able to do that with the help of a timer. The picture just gets chan

4条回答
  •  误落风尘
    2020-12-11 23:00

    There is no built-in support for such effects, but you can implement them. I'd suggest to write a custom control that renders the image and have a method for fade-swap, fade itself can be reached with alpha-blending drawing with .NET Graphics class.

    However, Graphics class isn't very fast, I don't recommend to use this technique for big images. If you need some fancy UI with hw-accelerated effects, take a look at WPF.

提交回复
热议问题