WPF图像交叉淡入淡出c#
我可以控制一个图像列表WPF图像交叉淡入淡出c#,c#,wpf,bitmapimage,C#,Wpf,Bitmapimage,我可以控制一个图像列表 public List<BitmapImage> Images { get; set; } 有人知道如何交叉淡入淡出图像,以便在交换图像时看起来更好吗?您可以在布局中使用两个重叠的图像控件,并使用故事板淡入/淡出它们。然后您可以将图像加载到隐藏的图像控件中,完成后,淡入淡出另一个。这种情况会持续下去……我会调查的,谢谢:) Image imgpanel = new System.Windows.Controls.Image();
public List<BitmapImage> Images { get; set; }
有人知道如何交叉淡入淡出图像,以便在交换图像时看起来更好吗?您可以在布局中使用两个重叠的
图像控件,并使用故事板淡入/淡出它们。然后您可以将图像加载到隐藏的图像控件中,完成后,淡入淡出另一个。这种情况会持续下去……我会调查的,谢谢:)
Image imgpanel = new System.Windows.Controls.Image();
imgpanel.Source = image;
imgpanel.Stretch = maintainAspectRatio ? Stretch.Uniform : Stretch.Fill;
imgpanel.StretchDirection = StretchDirection.Both;