c# - RichTextBox change text on drag or drop -


i trying add newline when drading text 1 richtextbox another. have text in draggedtext, seems nothing happening. no newline appears. every dragge text richtextbox should in new line. xaml:

<richtextbox x:name="first" previewdragenter="dragenter_executed"> 

c#

 private void dragenter_executed ( object sender, drageventsargs e ) { var draggedtext = environment.newline + e.data.getdata( dataformats.text ).tostring(); e.data.setdata ( draggedtext );  } 

well, couple of things.

first, dragenter ..when drag enters area ... you'll change mouse icon, , maybe show preview of dropping if you'll drop it.

the real magic happens on drop event, 1 in charge of doing changes because dropped object target area.

you'll want append text other textbox (are sure want replace it?), , continue on whatever need do.

you can have @ official msdn page more


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -