我想覆盖包含ActiveX控件嵌入VLC的WindowsFormsHost上的按钮。我的问题是,activeX始终在wpf之上。有没有什么办法可以通过对activeX控件进行wpf控制?wpf over activeX
VLC控件似乎也不支持渲染到位图。
我想覆盖包含ActiveX控件嵌入VLC的WindowsFormsHost上的按钮。我的问题是,activeX始终在wpf之上。有没有什么办法可以通过对activeX控件进行wpf控制?wpf over activeX
VLC控件似乎也不支持渲染到位图。
我终于找到了解决办法。 popup基元也是一个始终位于顶部并且可以放置在vlc控件上的元素。它有点破解,但它得到我需要的覆盖。我的球员xaml看起来像这样
<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>
上面在包含按钮的vlc播放器上放置了一个浅灰色透明层。上述内容并没有说明窗口是否调整大小或移动了,但是将wpf放在控件上的问题已经解决。
对于VLC的情况,有VideoLan.Net可用:http://vlcdotnet.codeplex.com/ 允许将视频输出到图像。