同样是订阅了同样的事件,为什么TextBox控件没有响应DragDrop.DropEnter事件和DragDrop.Drop事件?而Ellipse控件却有响应?
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"
Height="350"
Width="525">
Height="120"
Margin="10,22,0,0"
TextWrapping="Wrap"
Text="TextBox"
VerticalAlignment="Top"
Width="219"
AllowDrop="True"
DragEnter="TextBox_DragEnter"
Drop="TextBox_Drop" />
<Ellipse HorizontalAlignment="Left"
Height="186"
Margin="296,22,0,0"
Stroke="Black"
VerticalAlignment="Top"
Width="198"
Fill="Red"
AllowDrop="True"
DragEnter="ellipse_DragEnter"
Drop="ellipse_Drop" />
</Grid>
不知道你这个问题是否已经解决, 如果还没有解决的话: