使用C#/ XAML在地铁样式应用程序中保存画布作为图像 [英] saving canvas as image in metro style app with C#/XAML

查看:331
本文介绍了使用C#/ XAML在地铁样式应用程序中保存画布作为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个油漆像应用程序在metro风格与C#/ XAML。我想保存任何内容画在画布上作为图像。我已经检查过这个解决方案,但它没有帮助我。

I am developing a paint like application in metro style with C#/XAML. I want to save whatever content is drawn on canvas as image. I have checked this solutions but it didn't helped me.

将画布保存到位图
http://blogs.msdn.com/b/saveenr/archive/2008/09/18/wpf-xaml-saving-a-window-or- canvas-as-a-png-bitmap.aspx

Save canvas to bitmap http://blogs.msdn.com/b/saveenr/archive/2008/09/18/wpf-xaml-saving-a-window-or-canvas-as-a-png-bitmap.aspx

那么如何将画布内容保存为图片呢?请帮助我编写示例代码。

So how can I save the canvas content as image ? Please help me with sample coding.

推荐答案

似乎它目前不支持开箱即用,与WPF:

It seems it is currently not supported out of the box like we were used to do it with WPF:

http://social.msdn.microsoft.com/Forums/zh-CN/winappswithcsharp/thread/dd66c749-efed-4b55-a716-e0aa3a637d28

在进行HTML5 / Javascript Metro应用程序时,您可以这样做:

While when doing HTML5/Javascript Metro apps you can do this:

http://social.msdn.microsoft.com/Forums/en-US/ winappswithhtml5 / thread / cf8c17dc-68d4-4777-951f-bb7f0665bd06

这篇关于使用C#/ XAML在地铁样式应用程序中保存画布作为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆