private void updateImage()
{
try
{
SnapshotImg.Source = null;
ImageExportOptions options = new ImageExportOptions();
options.FilePath = snapshot;
// options.
options.HLRandWFViewsFileType = ImageFileType.PNG;
options.ShadowViewsFileType = ImageFileType.PNG;
options.ExportRange = ExportRange.VisibleRegionOfCurrentView;
options.ZoomType = ZoomFitType.FitToPage;
options.ImageResolution = ImageResolution.DPI_72;
options.PixelSize = 1000;
doc.ExportImage(options);
BitmapImage source = new BitmapImage();
source.BeginInit();
source.UriSource = new Uri(snapshot);
source.CacheOption = BitmapCacheOption.OnLoad;
source.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
source.EndInit();
SnapshotImg.Source = source;
PathLabel.Content = "none";
}
catch (System.Exception ex1)
{
TaskDialog.Show("Error!", "exception: " + ex1);
}
}