c# - How to select all textbox text and textbox opacity in WP application -
i use textbox
address bar wp browser application. want select text when user selects textbox
, modify opacity.
i tried using gotfocus
method that. see whole text selected 1 second or , deselected. need modify opacity once focus on textbox
, when textbox
loses focus. using gotfocus
method can modify opacity when focus lost, when set again opacity percent nothing happens.
can give me hint regarding events determine text selected short period of time , opacity problem?
private void urltextbox_gotfocus(object sender, routedeventargs e) { urltextbox.opacity = 50; urltextbox.selectall(); } private void urltextbox_lostfocus(object sender, routedeventargs e) { urltextbox.opacity = 10; }
you can try subscribing 1 of tunnelling events (previewgotkeyboardfocus
, previewlostkeyboardfocus
) instead of gotfocus
event.