WPF控件异常Object must be initialized before operation can be performed.怎么解决啊?
Object must be initialized before operation can be performed. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x88982F0C报错代码出处如下:
var bytes = File.ReadAllBytes(imageFile);
if (bytes == null || bytes.Length == 0)
{ return null; }
using (var ms = new MemoryStream(bytes))
{
var decoder = BitmapDecoder.Create(ms, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
return decoder.Frames.FirstOrDefault(); }
求高手指点~ --------------------编程问答-------------------- 帮你顶上来
wpf没做过
补充:.NET技术 , C#