Reputation: 468
I am trying to include VideoView with some overlay in a changing view (scrolling, resizing, etc.). The problem is, that the overlay stays in the same position. I've tried to fix it, I've searched for a solution, but I wasn't able to find or come up with anything. Is it possible to do this somehow?
In ordere to provide a demo, I have edited Example1.xaml and Example1.xaml.cs from the LibVLCSharp.WPF.Sample app in the following way:
Example1.xaml
...
<ScrollViewer>
<StackPanel>
<StackPanel Background="Blue" Height="300" Width="200"/>
<uc:VideoView x:Name="VideoView" Width="200" Height="200"/>
<StackPanel Background="Red" Height="300" Width="200"/>
</StackPanel>
</ScrollViewer>
...
Example1.xaml.cs
...
public Example1()
{
InitializeComponent();
_controls = new Controls(this);
VideoView.Content = _controls;
VideoView.Height = 200;
}
...
This makes the window scrollable and should demonstrate the issue. The problem is, that the Start and Stop buttons don't scroll with the VideoView.
Thanks in advance.
Upvotes: 1
Views: 2339
Reputation: 4049
If you have followed the long history of "writing controls over a vlc view" in LibVLCSharp and Vlc.DotNet, and more broadly the question about "writing WPF control over a WinFormsHost", you know that it's all about hacks and tradeoffs.
In short:
I think the issue lies in how we handle that floating window, and you should post an issue on code.videolan.org . Otherwise, you will need to reimplement the VideoView with your own fix
Upvotes: 2