private async void LoadImage() { await Task.Run(() => { imagePath = LoadImage(imagePath); }); image.UpdateSource(imagePath); SetPicWindowSize(); }