作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在编写一个带有动态磁贴的 Windows 8 商店应用程序。每个动态磁贴都是需要每 x 分钟刷新一次的图像。我正在使用带有时间触发器的后台任务来生成我的图像并刷新磁贴。
生成我的图像意味着创建一个新图像并在其上绘制我的东西,但由于某种原因,我在尝试创建 WriteableBitmap 的新实例时遇到异常:
var newImage = new Windows.UI.Xaml.Media.Imaging.WriteableBitmap(10, 10);
var newImage = BitmapFactory.New(10, 10);
The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))
最佳答案
事实证明,这在 Windows 8 中是不可能的。
它在后续版本的 Win 8.1 和 UWP 中成为可能,通过 XamlBackgroundTask
关于windows-8 - 在后台任务中实例化 WriteableImage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13328503/
我正在编写一个带有动态磁贴的 Windows 8 商店应用程序。每个动态磁贴都是需要每 x 分钟刷新一次的图像。我正在使用带有时间触发器的后台任务来生成我的图像并刷新磁贴。 生成我的图像意味着创建一个
我需要一些有关 Java 中的 Writable- 和 BufferedImages 的帮助(11,Javafx): 如何将 WritabeImage 转换为 BufferedImage? - 不使用
我是一名优秀的程序员,十分优秀!