摘要:
相信用过WPF的BitmapImage的,都在用类似这样的代码来解决文件无法删除的问题!如果看看msdn上简单的描述,可以看到这样的说明:如果 StreamSource 和 UriSource 均设置,则忽略 StreamSource 值。如果要在创建 BitmapImage 后关闭流,请将 CacheOption 属性设置为 BitmapCacheOption.OnLoad。 默认 OnDemand 缓存选项保留对流的访问,直至需要位图并且垃圾回收器执行清理为止。static class AppHelper{public static BitmapImage GetBitmapImage(s 阅读全文
posted @ 2011-05-11 19:57
大厨无盐煮
阅读(2505)
评论(0)
推荐(1)
摘要:
<!--ContentPanel - place additional content here--> <Grid x:Name="ContentGrid" Grid.Row="1"> <ListBox Height="451" HorizontalAlignment="Left" Margin="9,28,0,0" Name="listBox1" VerticalAlignment="Top" Width="460 阅读全文
posted @ 2011-05-11 11:22
大厨无盐煮
阅读(496)
评论(0)
推荐(0)