I have a canvas on my WPF form that I need to run a sequence of images at Runtime. How do I refresh the images in the canvas?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Any changes you make to visual elements in a WPF application will be reflected in the view. You do not need to invoke a Refresh method to make changes visible. For your application you could create a
DispatcherTimer, then either change yourImage.Sourceor replace yourImageon eachTick.For example:
And this code-behind: