async Task UpdateImageSource() { CleanImageSource(); _softwareBitmap = _bitmap.ToSoftwareBitmap(); _sbs = new SoftwareBitmapSource(); await _sbs.SetBitmapAsync(_softwareBitmap); image.Source = _sbs; imageGrid.Width = _bitmap.PixelWidth; imageGrid.Height = _bitmap.PixelHeight; InitSelection(); }