5

I would like to add some kind of watermark over a page in my application : The watermark is a UIElement (a Canvas for instance with partial opacity) which is on top of all others controls.

And I want it to be "transparent" to any touches/clicks/gestures. As "transparent", I mean that controls that are behind should act normally for touches/clicks/gestures. For instance if my watermark is above some kind of document viewer, I can still use swipe to navigate my document viewer (across the watermark canvas).

In my different attempts (I tried with ManipulationMode, PointerPressed, ...) my watermark is either not visible or either blocking touches/clicks/gestures.

2 Answers 2

1
+50

Unfortunately, there isn't a way in a Windows 8.1 application to place XAML content OVER a WebView without obstructing the mouse/gestures that would normally be passed. While using IsHitTestVisible is normally the correct choice, due to the nature of how WebView is integrated, it simply does not work.

(This also does not work in the current builds of Windows 10.)

The only other option that may not be desirable would be to manipulate the HTML content, which you could do by InvokingScriptAsync and adding an HTML img element to the BODY dynamically.

1

I believe property IsHitTestVisible is what you are looking for. This way control will ignore mouse and other interaction and let's them "through".

1
  • 1
    It does not seems to work when the watermark is on top of a WebView (the standard Windows 8.1 WebView). The WebView does not receive any touch. Jun 1, 2015 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.