c# - Why is my text box contained in a FlipView obscured by the soft keyboard when it pops up? -


please consider following xaml:

<page x:class="inputcontrolsinscrollviewer.windowsstoreapp.mainpage"       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       xmlns:d="http://schemas.microsoft.com/expression/blend/2008"       xmlns:l="using:inputcontrolsinscrollviewer.windowsstoreapp"       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"       mc:ignorable="d">     <page.resources>         <style x:key="flipviewitemstyle" targettype="flipviewitem">             <setter property="background" value="transparent" />             <setter property="horizontalcontentalignment" value="stretch" />             <setter property="verticalcontentalignment" value="stretch" />             <setter property="tabnavigation" value="local" />             <setter property="template">                 <setter.value>                     <controltemplate targettype="flipviewitem">                         <border borderbrush="{templatebinding borderbrush}"                                 borderthickness="{templatebinding borderthickness}"                                 background="{templatebinding background}">                             <scrollviewer istabstop="true"                                           zoommode="disabled"                                           verticalscrollmode="enabled"                                           horizontalscrollmode="disabled"                                           horizontalscrollbarvisibility="disabled"                                           verticalscrollbarvisibility="auto"                                           isverticalrailenabled="true">                                 <contentpresenter contenttemplate="{templatebinding contenttemplate}"                                                   contenttransitions="{templatebinding contenttransitions}"                                                   content="{templatebinding content}"                                                   horizontalalignment="{templatebinding horizontalcontentalignment}"                                                   margin="{templatebinding padding}"                                                   verticalalignment="{templatebinding verticalcontentalignment}" />                             </scrollviewer>                         </border>                     </controltemplate>                 </setter.value>             </setter>         </style>     </page.resources>     <page.datacontext>         <l:mainpageviewmodel />     </page.datacontext>      <grid>         <grid.columndefinitions>             <columndefinition />             <columndefinition width="auto" />         </grid.columndefinitions>         <flipview background="{themeresource applicationpagebackgroundthemebrush}"                   itemssource="{binding views}" itemcontainerstyle="{staticresource flipviewitemstyle}" />      </grid> </page> 

in it, have flipview operates in horizontal mode. content want display in flipview large - that's why added scrollviewer flipviewitem template user can scroll vertically (please note flipview template uses horizontal scrollviewer internally).

the content displayed flipview contains input controls text boxes , obviously, soft keyboard shown when user taps text box (so gets focused).

here actual question: why text box not translated remaining view port not obscured soft keyboard (see images)

flipview issue 1 flipview issue 2

obviously, has flipview because when display example view in scrollviewer (or no scrollviewer @ all), text box translated correctly when soft keyboard pops up.

i have tried following steps:

  1. i tried enable vertical scrolling on scrollviewer in flipview's template - doesn't work because flipview seems overwrite corresponding values in onapplytemplate (or something) - verticalscrollmode disabled when orientation on flipview' virtualizingstackpanel set horizontal.
  2. as mentioned above, tried display exact same view within scrollviewer (which worked fine) or without scrollviewer (which worked fine).
  3. i check scrollviewer.bringintoviewonfocuschanged doesn't change (and besides, property has default value set true).

is there way can circumvent problem? thank in advance!

i'm not sure offhand why textboxes aren't translating up, can work around problem handling inputpane yourself.

subscribe inputpane.showing , hiding events. when fire animate flipview's rendertransform translate out of way of inputpane's occludedrect , set ensuredfocusedelementinview true mark app has handled , windows doesn't need again.

the responding appearance of on-screen keyboard sample demonstrates basics.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -