在媒体播放器元素或 LibVLCSharp 播放器上添加图层

发布于 2025-01-09 01:21:03 字数 683 浏览 2 评论 0原文

我想在视频顶部添加椭圆形等形状。 现在,如果我在媒体播放器元素上添加一个形状,我可以在 wpf 设计器中看到它 但在运行时看不到它。

   <Grid>

        <controls:MediaPlayerElement x:Name="mediaPlayerElement"
            Source="https://mediaplatstorage1.blob.core.windows.net/windows-universal-samples-media/elephantsdream-clip-h264_sd-aac_eng-aac_spa-aac_eng_commentary-srt_eng-srt_por-srt_swe.mkv"
            AreTransportControlsEnabled="True" />
        <Grid>
            <Ellipse HorizontalAlignment="Center" Height="155"  Width="273" Fill="Black" Opacity="100" />
        </Grid>
    </Grid>

与 VLClibSharp 播放器相同。唯一的区别是,对于这个播放器,我在 wpf 设计器中看不到形状。

我怎样才能在运行时看到形状?

I want to add shapes like ellipse on top of the video.
right now if i add a shape over the media player element i can see it in the wpf desinger
but can not see it in runtime.

   <Grid>

        <controls:MediaPlayerElement x:Name="mediaPlayerElement"
            Source="https://mediaplatstorage1.blob.core.windows.net/windows-universal-samples-media/elephantsdream-clip-h264_sd-aac_eng-aac_spa-aac_eng_commentary-srt_eng-srt_por-srt_swe.mkv"
            AreTransportControlsEnabled="True" />
        <Grid>
            <Ellipse HorizontalAlignment="Center" Height="155"  Width="273" Fill="Black" Opacity="100" />
        </Grid>
    </Grid>

same with the VLClibSharp player. the only diffrence is that with this player i dont see the shape in the wpf designer.

how can i make the shapes seen in runtime?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文