Click here to Skip to main content
15,868,164 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Please explain about this features how supportive they are in WPF.

Hope my question is understood. If any queries please let me know.
Posted
Updated 20-May-13 21:55pm
v2
Comments
Francisco T. Chavez 14-May-13 3:41am    
Are you using the drag and drop to set up the look and content of the XAML page that you are trying to generate? Or, are you asking about the feasibility of two separate issues in the same question. If they aren't separate issues, but they don't relate to each other in the way that I asked, then how do they relate?
Mohammed Hameed 14-May-13 3:47am    
Yes, they are related each other. Let me frame my question like this: Whether is it feasible to have drag/drop feature on a Xaml page, which is created on the fly?
Francisco T. Chavez 14-May-13 4:09am    
So you're asking how much work it would take to have dynamically generated XAML pages with drag & drop functionality.

My net question is, where are you dragging from? I've played around a little bit with drag & drop, and I found that this can make a big difference in the amount of work that would be needed. Well, a more honest answer would be that there are short cuts to the amount of work that's needed based on where you are dragging to and from.
Mohammed Hameed 14-May-13 4:53am    
The new Xaml page would be under a main Xaml page. The main Xaml page will have a Toolbox, from which a control will be dragged and dropped in the new page. Plz go thru my another question related to this for better understanding: http://www.codeproject.com/Questions/591428/LoadplusXamlplusfileplusinplusaplusContainerplus-e
Mohammed Hameed 16-May-13 5:31am    
Hi.
By now I have experimented practically with drag/drop. First I have tried to use Canvas to load the Xaml page but it is throwing the exception: Page can have only Window or Frame as parent. Next I used one Frame and in this Frame successfully able to load the page but unable to drop any element. I mean Drop event is not firing once inside the boundary of Frame control (eventhough there is a AllowDrop property set to true). Then I wrapped the Frame under a Canvas control but still I am only able to drag/drop to canvas area other than Frame.
Finally, it is like both are having distinct issue, canvas cannot be parent to a page and frame does not support drag/drop feature.
Can you please give your valuable suggestions on this and recommend any other suitable approach.
Thanks in advance.

1 solution

Now it is working fine. I'm using Canvas only and in that dragging controls and on save click, reading the contents of canvas and writing to a xaml file.

For further understanding, check the above comments.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900