SuRGeoNix / Flyleaf

Media Player .NET Library for WinUI 3/ WPF/WinForms (based on FFmpeg/DirectX)
GNU Lesser General Public License v3.0
687 stars 92 forks source link

SharedOverlay as the Visual of a VisualBrush #458

Closed eliacanavera1111 closed 2 months ago

eliacanavera1111 commented 2 months ago

Is it possible to insert a FlyleafSharedOverlay as the Visual of a VisualBrush?

<VisualBrush x:Name="mirror_visual" Visual="{Binding}"/>

My SharedOverlay UserControl (to bind into the visual property of the visualbrush):

<UserControl x:Class="Streaming_Manager.MosaicControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:fl="clr-namespace:FlyleafLib.Controls.WPF;assembly=FlyleafLib">
    <fl:FlyleafSharedOverlay Name="main_host">
        <fl:FlyleafSharedOverlay.DetachedContent>
            <Canvas x:Name="detached_canvas" Background="Black" AllowDrop="True">
                <!--here the video players-->
            </Canvas>
        </fl:FlyleafSharedOverlay.DetachedContent>
        <Canvas Name="MosaicCanvas" Background="Transparent" Panel.ZIndex="0">
            <!--here other usercontrols-->
        </Canvas>
    </fl:FlyleafSharedOverlay>
</UserControl>

I need it to do a mirror / duplication effect of this usercontrol in another window.