Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/333.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WPF图像交叉淡入淡出c#_C#_Wpf_Bitmapimage - Fatal编程技术网

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;