Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows phone 7 WP7-拖拽及;带嵌套布局的拖放_Windows Phone 7_Xaml_Layout_Drag And Drop - Fatal编程技术网

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
布局。 如果可能的话,我不想添加基于手动按钮的滚动或编程布局

有人有什么想法吗