private void SetImageRight() { this.Dispatcher.Invoke(() => { picCapture.Source = galleryController.ConvertToImage(byJpegPicBuffer); }); }
public void LoadGalleryImageList() { if (galleryController == null) { galleryController = new GalleryController(); galleryController.CreateAndOpenGalley(patientId); } this.Dispatcher.Invoke(() => { listBox.Items.Clear(); galleryController.GetGalleryFilesList(patientId).ForEach((string path) => { byte[] array = File.ReadAllBytes(path); Image image = new Image(); image.Source = galleryController.ConvertToImage(array); ListBoxItem lbi = new ListBoxItem(); lbi.Width = 80; lbi.Height = 80; lbi.Content = image; listBox.Items.Add(lbi); }); }); }