在图像的.xaml文件中,我们如何添加另存为选项 [英] In a .xaml file for an image how can we add save as option

查看:55
本文介绍了在图像的.xaml文件中,我们如何添加另存为选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在xaml文件中我有一个图像,我必须保存它。所以我需要一些像我们右键点击图像的东西,我应该得到一个选项'另存为



我尝试了什么:



< Image x:Name =Horizo​​ntalAlignment =LeftMargin =0,-10,0,0 VerticalAlignment =TopSource =Stretch =UniformToFillHeight =510Width =799d:IsHidden =True/> 

解决方案

您可以在代码隐藏中执行此操作... 将wpf图像控制保存到文件的最简单方法 - Stack Overflow [ ^ ](包括代码)

in a xaml file i have an image and i have to save that. so for that i need something like when we right click on the image, i should get an option as 'save as

What I have tried:

<Image x:Name="" HorizontalAlignment="Left" Margin="0,-10,0,0" VerticalAlignment="Top"  Source="" Stretch="UniformToFill" Height="510" Width="799" d:IsHidden="True"/>

解决方案

You would do it in the code-behind... Easiest way of saving wpf Image control to a file - Stack Overflow[^] (includes code)


这篇关于在图像的.xaml文件中,我们如何添加另存为选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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