我有一个示例数据绑定到listbox datatemplate,每个项目都有一个带有ConstrainToParentBounds false的MouseDragElementBehavior。我想将列表框中的任何项目拖动到页面中的任何空间。但是,项目仍然限制在列表框中。有什么建议? AllowDrop属性在Windows Phone上不起作用。
<ListBox x:Name="countryName" HorizontalAlignment="Left" Height="361" Margin="10,10,0,0" VerticalAlignment="Top" Width="436">
<i:Interaction.Behaviors>
<el:MouseDragElementBehavior ConstrainToParentBounds="False"/>
</i:Interaction.Behaviors>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Name}">
</TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>