我有位图图像变量,我想将它绑定到我的xaml窗口。绑定Xaml位图图像
System.Reflection.Assembly thisExe;
thisExe = System.Reflection.Assembly.GetExecutingAssembly();
string[] resources = thisExe.GetManifestResourceNames();
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SplashDemo.Resources.Untitled-100000.png");
Bitmap image = new Bitmap(stream);
这是我的XAML代码
<Image Source="{Binding Source}" HorizontalAlignment="Left" Height="210" Margin="35,10,0,0" VerticalAlignment="Top" Width="335">
</Image>
u能帮助我的C#代码此位变量绑定到这个XAML的形象?
关键是我想让一个像幻灯片一样改变这张照片的计时器。我做了一个计时器,但我不知道如何通过C#代码更改图像 – user1493114
好的,我试着用这个名字! – user1493114
我发布的代码应该完全适用于这种情况。你需要一个例子吗? – Adam