Unfortunately, I still do not have enough reputation to make a comment, so I will put it as an answer. I had a very similar problem with Flash recently, and I ended up using WindowsFormsHost and Overlays / Adorners . Just my 2cents.
Here XAML creates the overlay as a popup:
<Grid> <Canvas > <WebBrowser x:Name="wbMain" Width="800" Height="500"></WebBrowser> <Popup x:Name="puOverlay" AllowsTransparency="True" Placement="Bottom" PlacementTarget="{Binding ElementName=wbMain}"> <Ellipse Canvas.Left="0" Canvas.Top="0" Height="50" Name="headEllipse" Stroke="Black" Fill="Orange" Width="50" Canvas.ZIndex="5"/> </Popup> <Ellipse Canvas.Left="0" Canvas.Top="0" Height="50" Name="headEllipse1" Stroke="Black" Fill="Orange" Width="50" Canvas.ZIndex="5"/> </Canvas> </Grid>
For simplicity, I reduced my overlay to one ellipse. The web browser is hosted by WindowsFormsHost. Here its code is placed and displayed:
public MainWindow() { InitializeComponent(); puOverlay.VerticalOffset = -60; puOverlay.HorizontalOffset = (wbMain.ActualWidth / 2) - 20; puOverlay.IsOpen = true; ... }
Quite simply, however, do not hesitate to ask, something else is unclear.
source share