private void btnShow_Click(object sender, RoutedEventArgs e) { Window window = new Window(); window.Width = 1024; window.Height = 768; Grid mainGrd = new Grid(); Image img = new Image(); img.Source = LImage.LoadImageFromByteArray(lstDuLieuHinhAnh[_currentIndex].Data); mainGrd.Children.Add(img); window.Content = mainGrd; window.ShowDialog(); }
public void SetImage() { try { if (lstDuLieuHinhAnh != null && lstDuLieuHinhAnh.Count > 0 && _currentIndex <= lstDuLieuHinhAnh.Count - 1) { if (_currentIndex < 0) { _currentIndex = 0; } imgKhachHang.Source = LImage.LoadImageFromByteArray(lstDuLieuHinhAnh[_currentIndex].Data); SetEnableControl(); } } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } }