CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
383 stars 89 forks source link

microsoft.toolkit.wpf.ui.controls.webview control goes out of scroll view #55

Open suvish opened 6 years ago

suvish commented 6 years ago

I'm submitting a...

Bug report (I searched for similar issues and did not find one)

Current behavior

when microsoft.toolkit.wpf.ui.controls.webview control placed inside another scrollview ,as we scroll the webview goes out of bounds of scrollview covering other controls.

Expected behavior

the controls places inside scrollview should be confined to its bounds.

Minimal reproduction of the problem with instructions

Initial view of app

scrollinitial

After Scrolling

scrollafter

Test App Wpftest.zip

Environment

Nuget Package(s): Microsoft.Toolkit.Wpf.UI.Controls.Webview

Package Version(s): 5.0.0.0

Windows 10 Build Number:

App min and target version:

Device form factor:

Visual Studio

net Framework Target:4.6.2

nmetulev commented 5 years ago

Is this related to #2651? @marb2000, do you know if this is expected/known issue?

rjmurillo commented 5 years ago

I think they're related and of similar issue described in #2651 as the WebViewControl gets its own HWND and does not allow WPF to draw anything over it. To work around the issue one could use CapturePreviewToStreamAsync to capture the image and place it in a brush that's swapped in the visual tree so z-order behaves as expected. Similar work would need to be done with WebBrowserBrush in previous versions of WebBrowser. See User Interface Support Team Blog, Nitish Nagpal. (2012, April 12). How to display controls above WebBrowserControl in Silverlight.