windows 8 - Stop focus being lost when a grid or border control is touched in Win RT Xaml -


i have grid , in row 1 have stack panel 2 textboxes. textboxes highlight when have focus (i use custom style same happens without one).

when click on mybutton button event fires , focus stays within textbox have istabstop="false" on button. if click on grid space next buttons focus on textbox lost. how can stop happening on controls grid there no istabstop option on grid?. have same problems on other controls. idea how can stop focus being lost when grid example touched?

this windows 8 store app using win rt xaml , designed use on tablet device.

thanks

<grid background="lightgray"       x:name="gridmaingrid">     <grid.rowdefinitions>         <rowdefinition height="auto" />         <rowdefinition height="*" />         <rowdefinition height="auto" />         <rowdefinition height="auto" />     </grid.rowdefinitions>      <!-- header -->     <border grid.row="0"             background="white"             margin="5">      </border>      <!-- details -->             <stackpanel grid.row="1">         <textbox x:name="textbox1" height="100" margin="10" style="{staticresource mystyle}"/>         <textbox x:name="textbox2" height="100" margin="10" style="{staticresource mystyle}"/>     </stackpanel>      <!-- footer -->     <border grid.row="2"             background="white"              margin="5">         <grid x:name="gridbutton"               horizontalalignment="stretch">             <grid.columndefinitions>                 <columndefinition />                 <columndefinition />                 <columndefinition />                 <columndefinition />             </grid.columndefinitions>             <button x:name="mybutton"                      istabstop="false"                     grid.column="2"                     margin="5"                     horizontalalignment="stretch"                     minheight="80"                 <textblock textwrapping="wrap">my button</textblock>             </button>             <button x:name="buttonequipment" grid.column="3"                     margin="5"                     horizontalalignment="stretch"                     minheight="80"                     click="buttonequipment_click">                 <textblock textwrapping="wrap">equipment</textblock>             </button>         </grid>     </border> </grid> 

ill give work around this. give try , let me know if works.

use link , implement mouse , shift focus testbox

mouse gestures

try out , keep note of side effect. txtboxaex.focus() on mouse pointer up.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -