private void BTN_UploudImage_Click(object sender, RoutedEventArgs e) { OpenFileDialog filedialog = new OpenFileDialog(); filedialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); filedialog.Filter = "All Files|*.*|JPEGs|*.jpg|Bitmaps|*.bmp"; filedialog.FilterIndex = 2; if (filedialog.ShowDialog() == true) { BitMap = File.ReadAllBytes($@"{filedialog.FileName}"); PicturePath = filedialog.FileName; ShowImage(); } GroupControl_Logic.UpdateImg(groupId, BitMap); }