1
Link to the Image of my App드래그 앤 드롭 실패
나는 캔버스에이 개 그림이보다 어떤을 서로 니 어리 경우 감지 할 모두에 접촉 할 경우, 사진에 포함 된 데이터와 비교 작업 서로 가깝다.
갈색 영역은 그림 요소를 삭제하여 녹색 목록 상자에 추가 할 수있는 ScatterView입니다.
파란색 항목 상자에서 갈색 놓기 영역으로 직접 그림 항목을 놓을 수 있습니다.
하지만 노란색 스 캐터 뷰에서 먼저 드롭하면 갈색 스 캐쳐 뷰에 놓을 수 없습니다.
<Grid ShowGridLines="True">
<Grid.RowDefinitions >
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<s:ScatterView
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.RowSpan="1"
x:Name="ScatterLayer"
Background="Yellow"
ItemContainerStyle="{StaticResource ScatterItemStyle}"
AllowDrop="True"
ItemTemplate="{StaticResource ImageAndCaptionTemplate}"
ItemsSource="{Binding ScatterItems}"
s:SurfaceDragDrop.Drop="ScatterLayer_Drop"
s:SurfaceDragDrop.DragEnter="ScatterLayer_DragEnter"
s:SurfaceDragDrop.DragCompleted="ScatterLayer_DragCompleted" >
</s:ScatterView>
<s:SurfaceListBox
Grid.Row="0" Grid.Column="2"
AllowDrop="True"
x:Name="ListBoxVerticalBasket"
VerticalAlignment="Top"
Background="GreenYellow"
ItemsSource="{Binding Path=BasketItems}"
ItemTemplate="{StaticResource BasketTemplate}" >
<s:SurfaceListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</s:SurfaceListBox.ItemsPanel>
</s:SurfaceListBox>
<s:SurfaceListBox
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
x:Name="ShoppingList"
AllowDrop="True"
s:SurfaceDragDrop.DragCompleted="OnShoppingListDragCompleted"
s:SurfaceDragDrop.DragCanceled="OnShoppingListDragCanceled"
PreviewMouseLeftButtonDown="OnShoppingListPreviewMouseLeftButtonDown"
PreviewMouseMove="OnShoppingListPreviewMouseMove"
PreviewMouseLeftButtonUp="OnShoppingListPreviewMouseLeftButtonUp"
ItemsSource="{Binding Path=LibraryItems}"
ItemTemplate="{StaticResource ImageAndCaptionTemplate}"
PreviewTouchDown="OnShoppingListPreviewTouchDown"
PreviewTouchMove="OnShoppingListPreviewTouchMove"
PreviewTouchUp="OnShoppingListPreviewTouchUp"
Background="#FF00BDD8">
<s:SurfaceListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" AllowDrop="True"/>
</ItemsPanelTemplate>
</s:SurfaceListBox.ItemsPanel>
</s:SurfaceListBox>
<s:ScatterView
Grid.Column="2"
Grid.Row="1"
Background="DarkGoldenrod"
Width="300"
Height="100"
x:Name="ScatterViewDropArea"
VerticalAlignment="Top"
HorizontalAlignment="Left"
AllowDrop="True"
s:SurfaceDragDrop.Drop="ScatterViewDropArea_Drop">
</s:ScatterView>