Pie*_*eed 5 wpf drag-and-drop itemscontrol
我有以下XAML:
<DockPanel x:Name="OverViewContainer" AllowDrop="True">
<StackPanel Orientation="Horizontal"
DockPanel.Dock="Bottom"
HorizontalAlignment="Right">
<uicommon:Toolbar DataContext="{Binding Commands}" />
</StackPanel>
<ItemsControl ItemsSource="{Binding DocumentElements}"
ItemTemplate="{DynamicResource DocumentElementsItemTemplate}" />
</DockPanel>
Run Code Online (Sandbox Code Playgroud)
当我将数据拖到此面板上时,鼠标光标显示所有子项都允许删除,但在任何空白空间上,光标显示已禁用删除.如果我设置AllowDrop为false,我不能再删除子项,因此标志DOES有效.我想将数据放入到项目中的边距之间ItemsControl.
有任何想法吗?
| 归档时间: |
|
| 查看次数: |
1530 次 |
| 最近记录: |