Answered by:
Interaction between two snap apps

Question
-
Hi,
When I run my app I can snap another app and both will run at the same time.
Supposing I'm running myAPP and IE: is it possible to drag pictures from IE to myApp??
I created a DIV and add a listener to it:
<DIV id="drop"/>
...
drop.addEventListener(drop, 'drop', function (e) {
//Important code here...
}
But I cant get the drop event when I try to drag'n drop a picture from IE.
Are Metro apps able to interact through drag'n drop event?
Best regards
Thursday, March 1, 2012 8:38 PM
Answers
-
Metro apps share information via Sharing contracts, so the answer is no, you would no drag/drop an image from IE to a metro app. You would save an image from IE, then use the file picker in the metro application to choose the file that was saved.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Friday, March 2, 2012 7:54 PM
- Marked as answer by Jie Bao Saturday, April 7, 2012 1:24 PM
Friday, March 2, 2012 4:10 PMModerator
All replies
-
You might want to look at the file pickers as a way to import images:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465174.aspx
I don't believe Metro HTML5 apps support drag 'n' drop across applications and should show the not allowed mouse cursor (red circle with a diagonal line).
Thursday, March 1, 2012 9:52 PM -
Hi,
When I run my app I can snap another app and both will run at the same time.
Supposing I'm running myAPP and IE: is it possible to drag pictures from IE to myApp?
Best regards
Are Metro apps able to interact through drag'n drop event?
- Merged by Rob Caplan [MSFT]Microsoft employee, Moderator Friday, March 2, 2012 3:56 PM duplicate post
Friday, March 2, 2012 10:52 AM -
Metro apps share information via Sharing contracts, so the answer is no, you would no drag/drop an image from IE to a metro app. You would save an image from IE, then use the file picker in the metro application to choose the file that was saved.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Friday, March 2, 2012 7:54 PM
- Marked as answer by Jie Bao Saturday, April 7, 2012 1:24 PM
Friday, March 2, 2012 4:10 PMModerator -
Is this because of potential security issues or was it just not implemented? I thought Drag&Drop worked someone like clipboard, so it should be technically feasible since clipboard is supported in WinRT.
It would kind of suck if one of the earliest and best NUI paradigms was missing from Windows 8. It would just be a lot easier and more natural to drag things between two apps instead of having to click on charms and switch apps all the time if you can have two apps running at the same time anyway...
Filip Skakun
Monday, March 5, 2012 6:10 PM