开发者

about WPF GetResourceStream

StreamResourceInfo streamInfo = Application.GetResourceStream(new uri("UIOnly;component/Images/my_work.png", UriKind.Relative));

if ((streamInfo != null) && (streamInfo.Stream != null))
{
    开发者_JAVA百科  using (var stream = streamInfo.Stream)
      {

      }
}

when above code executed, the UIOnly.dll is locked until application exit, why??


Somehow the file handle is not released.

Have you tried explicit calling Close on the stream instead of just disposing it?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜