简体   繁体   English

应用程序栏在Windows Phone App中向上滚动Webbrowser视图

[英]Application Bar scrolls up the Webbrowser view in Windows phone App

I have been working on a windows phone 8 app. 我一直在Windows Phone 8应用程序上工作。 I have given complete space of my layout to a WebBrowser element which renders my mobile site's pages. 我已经将布局的完整空间分配给了WebBrowser元素,该元素呈现了我的移动网站的页面。

Those pages has: -A fixed header at the top. 这些页面具有:-顶部的固定标题 -A fixed text box for replies and search at the bottom -And a scrollable region in between . -底部有一个用于答复和搜索的固定文本框 -中间有一个可滚动区域

I have also provided my app with an Application Bar which provides buttons for some quick links. 我还为我的应用程序提供了一个应用程序栏,其中提供了一些快速链接的按钮。 Application Bar comes and goes depending on the page user is. 应用程序栏的出现和消失取决于页面用户。

Now the problem is: - When Application Bar comes up, my whole pages scrolls up and the fixed header goes out of view . 现在的问题是:-当出现应用程序栏时,我的整个页面都向上滚动,并且固定的标头不在视图范围内 without Application Bar things are fine. 没有应用程序栏,一切都很好。

Somebody else facing the same problem? 有人面临同样的问题吗? Are there any workarounds for this? 有什么解决方法吗?

NOTE - I tried reserving some space for the application bar and giving rest of the space to WebBrowser, but that also doesn't help. 注意 -我尝试为应用程序栏保留一些空间,并将其余空间提供给WebBrowser,但这也无济于事。 And strange thing is, things are working fine on emulator. 奇怪的是,在模拟器上一切正常。

Thanks 谢谢

I wonder if the platform does the same thing that happens when the SIP shows up - that would mean the root visual element has a RenderTransform / TransformGroup / TranslateTransform that gets updated when some OS component like the app bar shows up. 我不知道该平台是否会执行与显示SIP时发生的相同的事情-这意味着根视觉元素具有一个RenderTransform / TransformGroup / TranslateTransform ,当某些OS组件(如应用栏)出现时,它会更新。 Check Vinoth's answer to this question here: 在这里检查Vinoth对这个问题的答案:

Scrollable form control in Windows Phone 8 Windows Phone 8中的可滚动表单控件

It is normal for the page to scroll up (ie title disappears) when application bar opens. 当应用程序栏打开时,页面向上滚动(即标题消失)是正常的。 you can not do much about that. 您对此无能为力。

If your need is to have whole webpage visible including the title when the application bar is in view, then you need to reduce the height of web browser so it fit into a smaller window. 如果需要在查看应用程序栏时使整个网页(包括标题)可见,那么您需要减小Web浏览器的高度,以使其适合较小的窗口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM