Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

Fix Airspace issue #296

Closed
Closed

Description

@jeremyVignelles

Many users have reported Airspace issues while using this library. One issue to rule them all and in the darkness bind them.

Sample code (taken from #41):

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Wpf="clr-namespace:Vlc.DotNet.Wpf;assembly=Vlc.DotNet.Wpf" x:Class="LivestreamViewer.MainWindow"
        Title="MainWindow" Height="449" Width="753">
    <Grid>
        <Wpf:VlcControl x:Name="vlc" Margin="0,0,0,13" Panel.ZIndex="-1"/>
        <Grid x:Name="overlayGrid" HorizontalAlignment="Stretch" Height="25" Margin="0,0,0,0" VerticalAlignment="Bottom">
            <Rectangle Fill="Black" HorizontalAlignment="Stretch" Margin="0,0,0,0" Stroke="Black" VerticalAlignment="Stretch" IsHitTestVisible="False" Opacity="0.5"/>
        </Grid>
    </Grid>
</Window>

Technical explanations:

Following issues are impacted (and will be closed):

Proposed workarounds/hacks (untested):

Activity

  1. adamfierek commented on Sep 12, 2017

    @adamfierek

    https://github.com/kolorowezworki/Airhack
    Try this. It's quite dirty, but it works ;)

  2. jeremyVignelles commented on Sep 12, 2017

    @jeremyVignelles
    CollaboratorAuthor

    Thanks for providing a workaround! I'll keep this open until this is fixed or considered as an acceptable solution (I'd prefer the first option)

  3. adamfierek commented on Sep 12, 2017

    @adamfierek

    We cannot fix airspace. Maybe we can fix VLC control, but not general problem with Winforms. This is caused by the method of rendering WPF and Winforms controls and windows. I think, at the moment, we can base only on workarounds.

  4. jeremyVignelles commented on Sep 12, 2017

    @jeremyVignelles
    CollaboratorAuthor

    This could be fixed by #249 : If there is no reference to winforms, then there is no airspace issue, am I wrong? the option I'm thinking of is using DirectX to do the rendering, rather than using WinForm/HWND. vlc-winrt is already using that technique for win10 apps

  5. adamfierek commented on Sep 13, 2017

    @adamfierek

    Sure. No Winforms/Win32Api == no airspace. DirectX is rendered the similar way to WPF. Avoiding problem is avoid, not solve ;) #249 is not about fixing airspace, rather about making something very new and different of current solution. We can use HWND of WPF Window directly and it will not need a reference to Windows.Forms, but airspace effect will not disappear. My workaround is for general mixing Winforms and WPF, not only for Vlc.DotNet control ;)

  6. jeremyVignelles commented on Sep 14, 2017

    @jeremyVignelles
    CollaboratorAuthor

    A comment in #257 shows a workaround for the Airspace issue in stackoverflow : https://stackoverflow.com/questions/5978917/render-wpf-control-on-top-of-windowsformshost/23662410#23662410

  7. JUSTHassan commented on Nov 1, 2017

    @JUSTHassan

    A powerful workaround https://stackoverflow.com/a/43695349/1576027

    <interop:AirspaceDecorator AirspaceMode="Redirect" Background="White" IsInputRedirectionEnabled="True" IsOutputRedirectionEnabled="True"> <Wpf:VlcControl x:Name="vlcControl" Margin="0,0,0,0"/> </interop:AirspaceDecorator>

  8. jeremyVignelles commented on Jan 2, 2018

    @jeremyVignelles
    CollaboratorAuthor

    Will be solved in 3.0.0 when #365 gets merged

  9. jeremyVignelles commented on Jan 20, 2018

    @jeremyVignelles
    CollaboratorAuthor

    Should be fixed in 3.0.0-develop250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions