Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 2.73 KB

README.md

File metadata and controls

68 lines (43 loc) · 2.73 KB

LibVLCSharp.WPF

NuGet Stats NuGet Stats

LibVLCSharp.WPF is the WPF integration for LibVLCSharp.

It contains the views that allow to display a video played with LibVLCSharp in a WPF app.

LibVLCSharp.Forms.Platforms.WPF depends on this package.

This package depends on LibVLCSharp.

Supported frameworks:

  • net461+
  • netcoreapp3.0

Supported platform:

  • Windows

Airspace limitations

If you encounter UI issues with the WPF VideoView in your application, you may be running into what is called airspace limitations.

For context and explanations of the tradeoffs, see this PR. Issues related to airspace are tracked on our GitLab with the airspace tag.

WPF control specific stuffs

Due to the Airspace issue, you cannot easily draw things over the video in WPF, unless you have a hack like the one that is included in this project. This hack means that the WPF control works a little differently than other platform's.

If you want to place something over the control, you would probably write code like this in other platforms:

<Grid>
    <vlc:VideoView x:Name="VideoView" />
    <Button Click="Play_Clicked">PLAY</Button>
</Grid>

But for WPF, you would rather need something like this:

<Grid>
    <vlc:VideoView x:Name="VideoView">
        <Button Click="Play_Clicked">PLAY</Button>
    </vlc:VideoView>
</Grid>

The VideoView appears as a container in your XAML (you can set its Content property from code too), but it is really a detached window over your video control.

The DataContext of the VideoView is propagated to your overlay content. This means you can inherit the DataContext environment from the outside of your VideoView

Note : This behavior is specific to the LibVLCSharp WPF implementation and is not (yet?) available to LibVLCSharp.Forms.Platforms.WPF

Why should I reference this package in my project?

If you want to create a video application using WPF and any supported .NET language, this package is made for you.

You can also create a true cross-platform application with Xamarin.Forms, and use the WPF backend. In that case, you would need the LibVLCSharp.Forms.Platforms.WPF package instead, which internally references this one.

For other platforms, see the main documentation.