Can we drop a file in windows explorer from WPF window? - wpf

I have a treeview that shows the current file system. I want to add functionality to enable dropping files into windows explorer. If I drag any of the node of my treeview and drop it on any of the window of Windows explorer then the file will be copied to that location. How can I accomplish this?

First read this about how to implement drag and drop in WPF.
The read this for some information about what explorer expects when you drop in it.
Then ask new questions if you still have any.

Related

Open Directory with Special Panel in C# wpf

I Open a Folder in C# with following codes. But I want to disable the address bar so that someone does not understand the file's address. And nobody can go to the previous or next folder!
System.Diagnostics.Process.Start("explorer.exe", #"D:\Project WPF\Atlas\Samle\D-File\MyFiles");
Or open the Explorer in the C# Window.
You could try using ExplorerBrowser. This will help embed the explorer window in your application and will give you more control over what you wish to show.

Windows Form Toolbox is empty

In my Visual Studio 2015, Windows Forms Tool Box (where we have controls like Text box, button etc) is not showing up.
I tried checking all the check marks in Views->ToolBars, but no use.
Please help.
Thanks,
Make sure you have opened a Windows Forms project.
Open View menu and check Toolbox or use Ctrl+Alt+X shortcut and you will see the toolbox.
The toolbox will fill with controls when you open a Form or UserControl in design view.

Drag/Drop from WPF to Excel

Does anyone know if it possible to drag and drop an object from WPF to Excel?
It can be either an external WPF application or a WPF project hosted inside an elementhost of an Excel Addin.
I would look at this previous entry and use that to derive what you are looking for:
WPF: Drag and drop virtual files into Windows explorer

Drag and Drop in WPF not working for DataFormats.FileDrop

I am developing WPF application, with severals drag and drop support.
In my application has several controls: listView_A, listView_B, and radioButtons.
my drag and drop works if I drag item from listView_A -> listView_B, listView_A -> radioButtons etc.
But I am unable to drag file from windows to all of these controls (listview and radiobuttons), it just display a "no entry" cursor.
All of the controls has "AllowDrop" set to True.
I had tried all options I had, please help.
It is a known issue if you are using Windows Vista or Windows 7. Here is a similar question on StackOverflow:
C# Drag drop does not work on windows 7
The process detailed here: http://blogs.msdn.com/b/mossbiz/archive/2010/06/10/add-an-assembly-to-the-global-assembly-cache-on-windows-server-2008-r2.aspx seems like it might solve the problem.

How to create a control like Solution Explorer in Visual Studio?

I want to create control that seems and works like the Solution Explorer of Visual Studio.
I mean not the functionality of solution explorer, the control should be seems like that control. That means, server explorer, toolbox, error List,... All these controls will pop-out when we put mouse and pop-in when we leave. We can lock and unlock those controls also.
So can anyone help me, to get the solution for this problem.
Thanks!!!!!!!!!!!
I am assuming you are using C#/VB.NET for development. The dockpanel suite will provide a docking framework for an application. Basically in terms of dockpanel, it is the forms which can be docked on the application using drag and drop like visual studio.
So create a treeview control in the form and dock it to the parent. You can populate the treeview control based on file directories or any specific needs of your project. Please note in dockpanel you create a form by not inheriting from Form class but from DockContent class. Documentation will give you more insight of how to create applications. It has a good example along with the source code in which it simulates the all the visual studio panes. It also provides and option to save the position of various docks which can act as a user preference. For eg, you may like to position solution explorer on left side whereas i may want it on right side. this get stored in a conf file which gets read next time when you start the application.
Incase you using MFC, then visual studio 2008 SP1 provides you with docking framwork and within that use the treeview control.
XAML also provides a docking framework. But i am not sure, you need to verify.
Win32 API does not have any native docking framework.

Resources