开发者

WPF drag and drop selected text out from a TextBox

I have two WFP TextBoxes in a window. I select a part of text in the first TextBox and drag & drop the selected text into the second TextBox. The selected text is automatica开发者_运维知识库lly inserted into the second TextBox and deleted from the first TextBox.

When the text is dropped into the second TextBox it triggers OnDrop event. But I wonder if any event is also triggered in the FIRST TextBox that would inform me when the selected text in the first TextBox is going to be deleted due to dropping it into the second TextBox?

I would like to control the deletion of the selected text in the first TextBox when it has been successfully dropped into any other TextBox or any control in a window (without needing to know which was the actual target control. However, I need to know if the target control has accepted the dropped text, because if it would not accept it, the text should not be deleted from the first TextBox).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜