Welcome Guest Search | Active Topics | Sign In | Register

WebView is spilling over the WPF scroll viewer Options
pooja
Posted: Monday, November 19, 2018 1:06:53 AM
Rank: Newbie
Groups: Member

Joined: 11/15/2018
Posts: 3
I am trying to use EO web viewer inside my wpf user control,
I have a Simple user control which has a web viewer in it, at run time the web viewer is spilling over the container(scroll viewer).
I have attached a sample application for your reference.

Expected behavior like other controls web browser also should get scrolled without spilling over the space given for it.

Usercontrol:

UserControl x:Class="EOWebBrowserTEst.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:eo="http://schemas.essentialobjects.com/wpf/">
<Grid>
<eo:WebControl Height="600" Width="500">
<eo:WebControl.WebView>
<eo:WebView x:Name="Eowebview" Url="www.google.com">
</eo:WebView>
</eo:WebControl.WebView>
</eo:WebControl>
</Grid>
</UserControl>

MainWindow:

<Grid Height="500" Background="LightGray" >
<ScrollViewer>
<thi:UserControl1></thi:UserControl1>
</ScrollViewer>
</Grid>
eo_support
Posted: Monday, November 19, 2018 4:02:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

This is a known issue and there is no good solution rather than not using ScrollViewer. The root of the problem is ScrollViewer and child window (through HWndHost) does not work properly together. This is because ScrollViewer works with clip region, where clip region only applies to the same window, but not child windows. This is part of a larger issue that is called "airspace issue" of WPF. You can find more information about this issue here:

https://blogs.msdn.microsoft.com/dwayneneed/2013/02/26/mitigating-airspace-issues-in-wpf-applications/

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.