问题描述
- WPF 没有响应DragDrop.DropEnter事件和DragDrop.Drop事件
-
同样是订阅了同样的事件,为什么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>
解决方案
时间: 2024-11-03 17:23:18