How should you complete the relevant markup?

DRAG DROP
You are developing a Universal Windows Platform (UWP) app.
Users can drag and drop images on the screen to share them with their friends.
You need to implement drag and drop for the app. Users must be able to drop images onto a blue rectangle that the app displays.
How should you complete the relevant markup? To answer, drag the appropriate markup segments to the correct targets. Each markup segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

DRAG DROP
You are developing a Universal Windows Platform (UWP) app.
Users can drag and drop images on the screen to share them with their friends.
You need to implement drag and drop for the app. Users must be able to drop images onto a blue rectangle that the app displays.
How should you complete the relevant markup? To answer, drag the appropriate markup segments to the correct targets. Each markup segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

Answer:

Explanation:
Box 1: AllowDrop
Box 2: DragOver
Box 3: Grid_DragOver
Box 4: Drop
Use the AllowDrop and CanDrag properties to designate the areas of your app valid for dragging and dropping.
The following markup shows how to set a specific area of the app as valid for dropping by using the AllowDrop in XAML. If a user tries to drop somewhere else, the system won’t let them. If you want users to be able to drop items anywhere on your app, set the entire background as a drop target.

<Grid AllowDrop=”True” DragOver=”Grid_DragOver” Drop=”Grid_Drop”
Background=”LightBlue” Margin=”10,10,10,353″>
<TextBlock>Drop anywhere in the blue area</TextBlock>
</Grid>
https://docs.microsoft.com/en-us/windows/uwp/app-to-app/drag-and-drop



Leave a Reply 0

Your email address will not be published. Required fields are marked *