[UWP] UI控件在全屏模式下UWP消失 [英] [UWP]UI Controls disappear in fullScreen mode, UWP

查看:63
本文介绍了[UWP] UI控件在全屏模式下UWP消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即时创建一个视频播放器,当我将应用程序全屏显示时,XAML控制如播放/暂停,音量和放大等消失了。任何人都可以帮助我?


以下代码是我的C#全屏代码。

 ApplicationView.GetForCurrentView( ).TryEnterFullScreenMode(); 
mediaPlayer.IsFullWindow = true;


以下代码是我的XAML控件。

< AppBarButton Icon =" Play"能见度= QUOT;可见" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;中心" X:名称= QUOT;&的playVideo QUOT;点击= QUOT; playVideo_Click" /> 
< AppBarButton Icon =" Pause"能见度= QUOT;折叠" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;中心" X:名称= QUOT; pauseVideo"点击= QUOT; pauseVideo_Click" />

< AppBarButton Icon =" More" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;左" X:名称= QUOT; moreMenu"内容="菜单弹出">
< AppBarButton.Flyout>
< MenuFlyout>
< MenuFlyoutItem Text =" Open File ..." X:名称= QUOT;中openFile"点击= QUOT; openFile_Click" />
< MenuFlyoutItem Text =" Select Subtitle ..." X:名称= QUOT; chooseSubtitle" />
< MenuFlyoutItem Text =" About" X:名称= [关于" />
< / MenuFlyout>
< /AppBarButton.Flyout>
< / AppBarButton>

< AppBarButton Icon =" FullScreen"能见度= QUOT;可见" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;右" X:名称= QUOT; btnFullScreen"点击= QUOT; btnFullScreen_Click"高度= QUOT; 60"余量= QUOT; 0,0,73,0" />
< AppBarButton Icon =" BackToWindow"能见度= QUOT;折叠" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;右" X:名称= QUOT; btnExitFullScreen"余量= QUOT; 0,0,73,0"点击= QUOT; btnExitFullScreen_Click" />

< AppBarButton Icon =" Volume" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;右" X:名称= QUOT; btnVolume"点击= QUOT; btnVolume_Click" />

< Slider x:Name =" volumeSlider"能见度= QUOT;折叠" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;右"的ValueChanged = QUOT; volumeChanged"头= QUOT;体积"宽度= QUOT; 242"余量= QUOT; 0,0,10,63"最大= QUOT; 10" BorderBrush =" {ThemeResource AppBarBackgroundThemeBrush}" FocusVisualSecondaryBrush =" {ThemeResource AppBarButtonBackground}">
< Slider.Background>
< SolidColorBrush Color =" {ThemeResource SystemAltHighColor}"不透明度= QUOT 1 QUOT; />
< /Slider.Background>
< / Slider>




如果有任何身体可以提供帮助,请欣赏它。

解决方案

我正在创建一个视频播放器当我将应用程序全屏显示时,XAML控制如播放/暂停,音量和放大等消失了。任何人都可以帮助我吗?



以下代码是我的C#完整屏幕代码。



 ApplicationView.GetForCurrentView()。TryEnterFullScreenMode(); 
mediaPlayer.IsFullWindow = true;



以下代码是我的XAML控件。



< AppBarButton Icon =" Play"能见度= QUOT;可见" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;中心" X:名称= QUOT;&的playVideo QUOT;点击= QUOT; playVideo_Click" /> 
< AppBarButton Icon =" Pause"能见度= QUOT;折叠" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;中心" X:名称= QUOT; pauseVideo"点击= QUOT; pauseVideo_Click" />

< AppBarButton Icon =" More" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;左" X:名称= QUOT; moreMenu"内容="菜单弹出">
< AppBarButton.Flyout>
< MenuFlyout>
< MenuFlyoutItem Text =" Open File ..." X:名称= QUOT;中openFile"点击= QUOT; openFile_Click" />
< MenuFlyoutItem Text =" Select Subtitle ..." X:名称= QUOT; chooseSubtitle" />
< MenuFlyoutItem Text =" About" X:名称= [关于" />
< / MenuFlyout>
< /AppBarButton.Flyout>
< / AppBarButton>

< AppBarButton Icon =" FullScreen"能见度= QUOT;可见" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;右" X:名称= QUOT; btnFullScreen"点击= QUOT; btnFullScreen_Click"高度= QUOT; 60"余量= QUOT; 0,0,73,0" />
< AppBarButton Icon =" BackToWindow"能见度= QUOT;折叠" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;右" X:名称= QUOT; btnExitFullScreen"余量= QUOT; 0,0,73,0"点击= QUOT; btnExitFullScreen_Click" />

< AppBarButton Icon =" Volume" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;右" X:名称= QUOT; btnVolume"点击= QUOT; btnVolume_Click" />

< Slider x:Name =" volumeSlider"能见度= QUOT;折叠" VerticalAlignment = QUOT;底座"的Horizo​​ntalAlignment = QUOT;右"的ValueChanged = QUOT; volumeChanged"头= QUOT;体积"宽度= QUOT; 242"余量= QUOT; 0,0,10,63"最大= QUOT; 10" BorderBrush =" {ThemeResource AppBarBackgroundThemeBrush}" FocusVisualSecondaryBrush =" {ThemeResource AppBarButtonBackground}">
< Slider.Background>
< SolidColorBrush Color =" {ThemeResource SystemAltHighColor}"不透明度= QUOT 1 QUOT; />
< /Slider.Background>
< / Slider>





如果有任何身体可以提供帮助,请欣赏它。




Hi, im creating a video player, when I make the app full screen, the XAML controls like play/pause, volume & etc just disappear. can anyone help me?

this below code is my C# full Screen Code.

            ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
mediaPlayer.IsFullWindow = true;

and these below codes are my XAML Controls.

        <AppBarButton Icon="Play" Visibility="Visible" VerticalAlignment="Bottom" HorizontalAlignment="Center" x:Name="playVideo" Click="playVideo_Click"/>
        <AppBarButton Icon="Pause" Visibility="Collapsed" VerticalAlignment="Bottom" HorizontalAlignment="Center" x:Name="pauseVideo" Click="pauseVideo_Click"/>

        <AppBarButton Icon="More" VerticalAlignment="Bottom" HorizontalAlignment="Left" x:Name="moreMenu" Content="Menu Flyout">
            <AppBarButton.Flyout>
                <MenuFlyout>
                    <MenuFlyoutItem Text="Open File ..." x:Name="openFile" Click="openFile_Click"/>
                    <MenuFlyoutItem Text="Choose Subtitle ..." x:Name="chooseSubtitle"/>
                    <MenuFlyoutItem Text="About" x:Name="about"/>
                </MenuFlyout>
            </AppBarButton.Flyout>
        </AppBarButton>

        <AppBarButton Icon="FullScreen" Visibility="Visible" VerticalAlignment="Bottom" HorizontalAlignment="Right" x:Name="btnFullScreen" Click="btnFullScreen_Click" Height="60" Margin="0,0,73,0"/>
        <AppBarButton Icon="BackToWindow" Visibility="Collapsed" VerticalAlignment="Bottom" HorizontalAlignment="Right" x:Name="btnExitFullScreen" Margin="0,0,73,0" Click="btnExitFullScreen_Click"/>

        <AppBarButton  Icon="Volume" VerticalAlignment="Bottom" HorizontalAlignment="Right" x:Name="btnVolume" Click="btnVolume_Click"/>

        <Slider x:Name="volumeSlider" Visibility="Collapsed" VerticalAlignment="Bottom" HorizontalAlignment="Right" ValueChanged="volumeChanged" Header="Volume" Width="242" Margin="0,0,10,63" Maximum="10" BorderBrush="{ThemeResource AppBarBackgroundThemeBrush}" FocusVisualSecondaryBrush="{ThemeResource AppBarButtonBackground}">
            <Slider.Background>
                <SolidColorBrush Color="{ThemeResource SystemAltHighColor}" Opacity="1"/>
            </Slider.Background>
        </Slider>


Please, if any body can help, Ill appreciate it.

解决方案

Hi, im creating a video player, when I make the app full screen, the XAML controls like play/pause, volume & etc just disappear. can anyone help me?

this below code is my C# full Screen Code.

            ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
mediaPlayer.IsFullWindow = true;

and these below codes are my XAML Controls.

        <AppBarButton Icon="Play" Visibility="Visible" VerticalAlignment="Bottom" HorizontalAlignment="Center" x:Name="playVideo" Click="playVideo_Click"/>
        <AppBarButton Icon="Pause" Visibility="Collapsed" VerticalAlignment="Bottom" HorizontalAlignment="Center" x:Name="pauseVideo" Click="pauseVideo_Click"/>

        <AppBarButton Icon="More" VerticalAlignment="Bottom" HorizontalAlignment="Left" x:Name="moreMenu" Content="Menu Flyout">
            <AppBarButton.Flyout>
                <MenuFlyout>
                    <MenuFlyoutItem Text="Open File ..." x:Name="openFile" Click="openFile_Click"/>
                    <MenuFlyoutItem Text="Choose Subtitle ..." x:Name="chooseSubtitle"/>
                    <MenuFlyoutItem Text="About" x:Name="about"/>
                </MenuFlyout>
            </AppBarButton.Flyout>
        </AppBarButton>

        <AppBarButton Icon="FullScreen" Visibility="Visible" VerticalAlignment="Bottom" HorizontalAlignment="Right" x:Name="btnFullScreen" Click="btnFullScreen_Click" Height="60" Margin="0,0,73,0"/>
        <AppBarButton Icon="BackToWindow" Visibility="Collapsed" VerticalAlignment="Bottom" HorizontalAlignment="Right" x:Name="btnExitFullScreen" Margin="0,0,73,0" Click="btnExitFullScreen_Click"/>

        <AppBarButton  Icon="Volume" VerticalAlignment="Bottom" HorizontalAlignment="Right" x:Name="btnVolume" Click="btnVolume_Click"/>

        <Slider x:Name="volumeSlider" Visibility="Collapsed" VerticalAlignment="Bottom" HorizontalAlignment="Right" ValueChanged="volumeChanged" Header="Volume" Width="242" Margin="0,0,10,63" Maximum="10" BorderBrush="{ThemeResource AppBarBackgroundThemeBrush}" FocusVisualSecondaryBrush="{ThemeResource AppBarButtonBackground}">
            <Slider.Background>
                <SolidColorBrush Color="{ThemeResource SystemAltHighColor}" Opacity="1"/>
            </Slider.Background>
        </Slider>


Please, if any body can help, Ill appreciate it.



这篇关于[UWP] UI控件在全屏模式下UWP消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆