locked
[UWP]Issue with Scrollbar & Height of WebView RRS feed

  • Question

  • Hello, 

    I am developing a UWP App Using XAML & C#. In a page there is a web view inside Scroll Viewer, The Issue i am facing, that how to Disable Vertical Scroll bar of that Web View. i want that web view should adjust its height according to its content and its vertical scroll should be disabled. 

    Thank you in Advance for any help.


    Friday, June 24, 2016 12:05 PM

Answers

All replies

  • Hi shubhguru28,

    Welcome to the Developing Universal Windows apps forum!

    Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools  

    I have added tag for you this time, and you would need to add tag by yourself next time.

    In my experience, you could inject a JAVA Script code to disable the scroll in WebView.

    Please refer to this blog about “Universal Windows App- How to disable scroll in WebView?” for details.

    Best Regards,

    Xavier Eoro


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 27, 2016 5:46 AM
  • Hello Xavier,

    The Link is given in this article used for Windows 8.1 and i am developing for Windows 10, and i have already used that but the main problem with my work is, I am Placing the Web View inside a Scroll Viewer. and there i am unable to disable the scroll of my Web View.

    Monday, June 27, 2016 12:09 PM
  • @shubhguru28,

    Yes. I know that sample was windows 8.1, but I have tested its code in my side. I worked well in UWP.

    Here, I understand what you want to do. You used WebView to view web page, and you want to use your own scrollviewer to scroll the content on web page. But I think your idea was not correct. The scrollviewer scrolls its content. The content is WebView, not the web page.

    That sample in my above reply, it’s used to disable the web page’s VerticalScrollBar, not for WebView.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 28, 2016 9:49 AM
  • Hello Xavier,

    First of all Thank you so much you are helping a lot to me to understand this problem, but now i really need to solve my problem may you please help me to solve this problem. should i use any alternate of web view in my app.

    Actually my main motive is to scroll whole page in a single vertical scroll.

    in my page i have placed 3 grids, these are placed inside a Scroll Viewer,

    3rd grid contains web view, The Problem is that i want web view should change its Height according to its content height and its scroll should be disabled and the whole page should scroll vertically on a single Scroll Viewer (Parent Scroll Viewer Which contains all 3 Grids.)

    Kindly Provide a solution, i will be Thankful to you,

    Wednesday, June 29, 2016 11:06 AM
  • Hi shubhguru28,

    >>” The Problem is that i want web view should change its Height according to its content height and its scroll should be disabled and the whole page should scroll vertically on a single Scroll Viewer (Parent Scroll Viewer Which contains all 3 Grids.)”

    If my understanding was right, you want to set Webview height according to its HTML content size.

    I could only tell you that is not possible to auto size a webview based on its content. Please refer to Jambor’s reply this this thread: [UWP][XAML]Need to display webview content accroding to size of html content in UWP 

    This is his reply:

    "if sites are of a responsive design, the content will resize according with the webview control size. From my experience, it is not possible to auto size a webview based on its content. I would suggest you create a new feedback in UWP feedback forum: https://wpdev.uservoice.com/forums/110705-universal-windows-platform. Or vote this voice https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/6552414-disable-scrolling-and-zooming-in-webview"

    Best Regards,

    Xavier Eoro


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Saturday, July 2, 2016 7:53 AM
  • Hello Xavier,

    I will do accordingly, and thanks for your attentive concern about to solve my problem.

    Monday, July 4, 2016 5:45 AM
  • Hello Xavier,

    I will do accordingly, and thanks for your attentive concern about to solve my problem.


    You're welcome.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 5, 2016 9:34 AM