⑴ C# 、WPF 怎么把程序里的图片拖拽到其它的看图程序啊
C#或者wpf写的程序实现拖拽关键步骤在于:拖出来程序中的图片和鼠标松下时让其他程序进行接受(这一点类似于在windows窗口中拖拽文件到程序图标上,让程序打开),
我已经编译好一个程序,请留下邮箱发送给你.
⑵ wpf : Bitmap 的图片处理问题 如何将流中的图片加载到listView中
System.IO.MemoryStreamms=newSystem.IO.MemoryStream();
ImagemyImage3=newImage();
BitmapImagebi3=newBitmapImage();
bi3.BeginInit();
bi3.StreamSource=ms;//将流对象给StreamSource
bi3.EndInit();
myImage3.Stretch=Stretch.Fill;
myImage3.Source=bi3;
⑶ wpf(c#)怎样复制图片(操作图片的时候数据库只存放图片所在的路径)
usingSystem.IO;
stringdest=Path.Combin("c:image",Path.GetFileName(filename));
File.Copy(filename,dest);
你往C盘复制文件可能需要管理员权限
⑷ WPF中如何把截的图放到RichTextBox中然后存到数据库里
<RichTextBox Height="100" HorizontalAlignment="Left" Margin="90,57,0,0" Name="richTextBox1" VerticalAlignment="Top" Width="200" >
<RichTextBox.Document>
<FlowDocument Focusable="True">
<Paragraph>
<Run Text="123 哈哈"/>
<Image Source="D:\我的图片\1342892_10.jpg" Focusable="True" Height="50"/>
<Run Text="123 哈哈"/>
</Paragraph>
</FlowDocument>
</RichTextBox.Document>
</RichTextBox> 如果你要动态添加图片,你可以这样:private void button1_Click(object sender, RoutedEventArgs e)
{
Image i = new Image();FlowDocument f = new FlowDocument();
f.Blocks.Add(new BlockUIContainer(i));
richTextBox1.Document = f;
} save/load richtextbox to/from sql:http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/750a654e-b002-4742-8f46-609e93f6ec81 如果你要把图也保存到SQL,你网上搜下'save image to sql' 一大把