I have a transparent background webview that occasionally I need to interact over (for inking). When I switch to the webviewbrush the webviewbrush renders the transparency as black. I am wondering how to get render transparent: C# Code:
private void MyInkToolbar_ActiveToolChanged(InkToolbar toolbar, object sender)
{
if (myInkToolbar.ActiveTool == objectSelect)
{
textCanvas.IsHitTestVisible = true;
testTiny.Visibility = Visibility.Visible;
testTinyOverlay.Visibility = Visibility.Collapsed;
}
else
{
if (textCanvas.IsHitTestVisible == true)
{
testTinyOverlay.Visibility = Visibility.Visible;
CaptureWebView();
testTiny.Visibility = Visibility.Collapsed;
textCanvas.IsHitTestVisible = false;
}
}
}
private void CaptureWebView()
{
WebViewBrush b = new WebViewBrush();
b.SetSource(testTiny);
b.Redraw();
testTinyOverlay.Fill = b;
}
Xaml Code:
<Canvas x:Name="textCanvas">
<Grid Name="testTinyGrid" Width="200" Height="200" Background="Transparent">
<Rectangle x:Name="testTinyOverlay" Fill="Transparent"/>
<WebView x:Name="testTiny" DefaultBackgroundColor="Transparent" Source="ms-appx-web:///HTML/TinyEditor.html"/>
</Grid>
</Canvas>