wpf - Silverlight: Copy/Paste Context Menu with TextBox (Text Highlighting Issue) -
i have created textbox
control:
public class mytextbox : textbox
which normal textbox
, have added behavior have written:
public class textboxcutcopypastebehavior : behavior<textbox>
everything works fine , dandy: right-clicking display contextmenu
cut, copy, paste options. however, textbox
text ceases highlighted @ point, since textbox
has lost focus.
what best way make selected text remain highlighted, after contextmenu
appears , textbox
loses focus?
thank of help!
you should still able access selectedtext property of textbox
private void copymenuitem_click(object sender, routedeventargs e) { string texttocopy = mytextbox.selectedtext; // }
Comments
Post a Comment