Windows phone 7 WP7-拖拽及;带嵌套布局的拖放
我的页面设计如下:Windows phone 7 WP7-拖拽及;带嵌套布局的拖放,windows-phone-7,xaml,layout,drag-and-drop,Windows Phone 7,Xaml,Layout,Drag And Drop,我的页面设计如下: <ScrollViewer Margin="0" HorizontalAlignment="Left" Height="360" VerticalAlignment="Bottom"> <StackPanel x:Name="spQueuedWeapons" HorizontalAlignment="Left" VerticalAlignment="Bottom"> <ItemsControl ItemsSource="{
<ScrollViewer Margin="0" HorizontalAlignment="Left" Height="360" VerticalAlignment="Bottom">
<StackPanel x:Name="spQueuedWeapons" HorizontalAlignment="Left" VerticalAlignment="Bottom">
<ItemsControl ItemsSource="{Binding QueuedCombinations}" HorizontalAlignment="Left">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Image Source="{Binding ImageName}">
<i:Interaction.Behaviors>
<ex:MouseDragElementBehavior ConstrainToParentBounds="False" />
</i:Interaction.Behaviors>
</Image>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</ScrollViewer>
布局如下:
<ScrollViewer Margin="0" HorizontalAlignment="Left" Height="360" VerticalAlignment="Bottom">
<StackPanel x:Name="spQueuedWeapons" HorizontalAlignment="Left" VerticalAlignment="Bottom">
<ItemsControl ItemsSource="{Binding QueuedCombinations}" HorizontalAlignment="Left">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Image Source="{Binding ImageName}">
<i:Interaction.Behaviors>
<ex:MouseDragElementBehavior ConstrainToParentBounds="False" />
</i:Interaction.Behaviors>
</Image>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</ScrollViewer>
我看到的问题是,MouseDragElementBehavior
似乎在视觉上被限制在ScrollViewer
的范围内。
我希望能够将绿色框拖动到蓝色放置目标
到目前为止,我想到的唯一选择是删除包含的ScrollViewer
,或者以编程方式模拟StackPanel
布局。
如果可能的话,我不想添加基于手动按钮的滚动或编程布局
有人有什么想法吗