c# - win10 UWP OnScreen Keyboard is not hiding -
i have created win 10 uwp application . in have popup light dismissal enabled.
<popup x:name="addwebpagepopup" islightdismissenabled="true" isopen="{binding ispopupopen}" opened="addwebpagepopup_opened"> <textbox x:name="webpagenametextbox" text="{binding webpageurl, mode=twoway, updatesourcetrigger=propertychanged}" style="{staticresource texboxstyle}" keydown="webpagenametextbox_keydown" />` <button content="cancel" command="{binding cancelcommand}" horizontalcontentalignment="center"/> </popup>
in addwebpagepopup_opened
setting focus webpagenametextbox
. in cancelcommand
i setting ispopupopen
false
issue onscreenkeyboard in tablet mode. keyboard showing when popup opened , closing when cancel button clicked. issue there when touch outside popup. popup dismissed keyboard still visible. have idea why happen?
when presses "cancel" button, button gets focus -> keyboard hides. seems closing of popup not enough lose focus, keyboard still visible.
you can try change focus when popup being closed. although there no closing event, can register property changed callback event.
this.addwebpagepopup.registerpropertychangedcallback(popup.isopenproperty, (d, e) => { if (!this.popup.isopen) { // change focus else } });
Comments
Post a Comment