Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/266.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
C# 指向WP处图像对象的动态指针_C#_Windows Phone - Fatal编程技术网

C# 指向WP处图像对象的动态指针

C# 指向WP处图像对象的动态指针,c#,windows-phone,C#,Windows Phone,我有一个动态创建的图像和按钮附近的WP应用程序列表。 每个按钮都显示CameraCaptureTask,在任务完成时,我希望将捕获的图像绑定到位于给定按钮附近的图像。 我创建了一种全局指针 Image currentImage; 在任务显示前点击按钮,我将其附近的图像指定给该指针 currentImage = createdImage; BitmapImage bmp = new BitmapImage(); bmp.SetSource(e.ChosenPhoto); currentImag

我有一个动态创建的图像和按钮附近的WP应用程序列表。 每个按钮都显示CameraCaptureTask,在任务完成时,我希望将捕获的图像绑定到位于给定按钮附近的图像。 我创建了一种全局指针

Image currentImage;
在任务显示前点击按钮,我将其附近的图像指定给该指针

currentImage = createdImage;
BitmapImage bmp = new BitmapImage();
bmp.SetSource(e.ChosenPhoto);
currentImage.Source = bmp;
任务完成后,我将尝试将图像分配给该指针

currentImage = createdImage;
BitmapImage bmp = new BitmapImage();
bmp.SetSource(e.ChosenPhoto);
currentImage.Source = bmp;
但它不起作用。
问题是什么?

问题是在重新加载photocapture页面后