private void Window_Loaded(object sender, RoutedEventArgs e) { DispatcherTimer dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 0, 1); dispatcherTimer.Start(); } private void dispatcherTimer_Tick(object sender, EventArgs e) { CommandManager.InvalidateRequerySuggested(); _image.UriSource = new Uri(this.picUri); this.imgVideo.Source = _image; }
类似上面的代码
你好,我看你贴出的代码是根据timer改变image的source属性从而变换图片,可是我所想的注重的是变换的动作,比如无缝滚动,飞入飞出。
用动画 很简单 Blend生成 ,在改一下就能达到你要的效果
学习