相关疑难解决方法(0)

将文件拖放到WPF中

我需要将图像文件放入我的WPF应用程序中.当我放下文件时,我目前有一个事件触发,但我不知道接下来该怎么做.我如何获得图像?为sender对象的图像或控制?

private void ImagePanel_Drop(object sender, DragEventArgs e)
{
    //what next, dont know how to get the image object, can I get the file path here?
}
Run Code Online (Sandbox Code Playgroud)

.net c# wpf drag-and-drop image

95
推荐指数
3
解决办法
7万
查看次数

标签 统计

.net ×1

c# ×1

drag-and-drop ×1

image ×1

wpf ×1