C# XAML Metro Image dynamic Source
问题 I like to do simple animation using one Image control in XAML and swaping Source of Image to other in interval 1 second. But when I do that, the image is flickering. I using this code (at Tick event handler of Timer ): Uri uri = new Uri("ms-appx:/Sprites/Running/" + y++ + ".png", UriKind.RelativeOrAbsolute); BitmapImage textureBitmap = new BitmapImage(uri); this.ImageHolder.Source = textureBitmap; Where can the problem be ? Should I cache BitmapImages? Thank you for your help. 回答1: Try to