我想显示一个由两张图片组成的图像。
我希望图像rectangle.png和图像sticker.png重叠,sticker.png显示在顶部,并且其左上角位于像素10, 10处。
这是目前为止我所做到的,但是我该如何合并这两张图片呢?
Image image = new Image();
image.Source = new BitmapImage(new Uri(@"c:\test\rectangle.png"));
image.Stretch = Stretch.None;
image.HorizontalAlignment = HorizontalAlignment.Left;
Image imageSticker = new Image();
imageSticker.Source = new BitmapImage(new Uri(@"c:\test\sticker.png"));
image.OverlayImage(imageSticker, 10, 10); //how to do this?
TheContent.Content = image;