I have the following 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>
When I drag data onto this panel, the mouse cursor shows a drop is allowed on all the child items, but on any empty space, the cursor shows that dropping is disabled. If I set AllowDrop
to false, I can't drop onto the child items anymore, so the flag DOES have an effect. I would like to drop data into the margins between the items in the ItemsControl
.
Any ideas?
The problem is that your DockPanel is not performing hit testing - since it has no background.
The solution? Add a Background="Transparent" attribute to the <DockPanel> tag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With