Wpf over activeX

I am trying to overlay buttons on a WindowsFormsHost that contains VLC embedding in ActiveX. The problem with me is that activeX is always on top of wpf. Is there a way to get wpf control over an ActiveX control?

The VLC control also does not support rendering for a bitmap.

+4
source share
3 answers

I finally found a solution. A popup primitive is also an element that is always on top and can be placed above the vlc control. It's a little hack, but I need an overlay. My xaml for the player is as follows:

<grid> <WindowsFormsHost x:Name="Host" Height="200" Width="200" /> <Border x:Name="Anchor" Height="0" Width="0" HorizontalAlignment="Left" VerticalAlignment="Top" /> <Popup Width="{Binding ElementName=Host,Path=Width}" Height="{Binding ElementName=Host,Path=Height}" PlacementTarget="{Binding ElementName=Anchor}" AllowsTransparency="True" IsOpen="True"> <Border Background="#30808080" Width="{Binding ElementName=Host,Path=Width}" Height="{Binding ElementName=Host,Path=Height}"> <Button Content="Start" Height="20" Width="60" Click="button1_Click"/> </Border> </Popup> </grid> 

The above layer provides a transparent transparent layer above the vlc player that contains the button. The above does not take into account whether the window has changed or moved, but the problem with placing something wpf above the control has been resolved.

+4
source

Short answer: None.

Extracted from MSDN :

In the WPF user interface, you can change the z-order of elements to control overlap. The selected Windows Forms control is in a separate HWND, so it is always drawn on top of WPF controls.

+1
source

In the case of VLC, there is VideoLan.Net, available at http://vlcdotnet.codeplex.com/ which allows you to display video on an image.

0
source

All Articles