//隐藏状态栏
if (ApiInformation.IsTypePresent(typeof(StatusBar).ToString()))
{
StatusBar statusBar = StatusBar.GetForCurrentView();
await statusBar.HideAsync();
}
    using namespace Windows::UI;
using namespace Windows::Foundation::Metadata;
using namespace Windows::UI::ViewManagement;
   //透明度0-1之间,0为全透明,1为不透明
//全透明时候可能 前景色与默认色一致导致 信号等信息显示不出来,可改不透明或者改前景色
//全屏模式下 与底色做透明运算。。可类似沉浸式状态栏
//判断当前环境是否支持ViewManagement.StatusBar
if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
{
//设置全屏模式
var applicationView =ApplicationView.GetForCurrentView();
applicationView.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
var statusBar = ViewManagement.StatusBar.GetForCurrentView();
statusBar.BackgroundColor =Colors.Red; //背景色 statusbar.BackgroundOpacity = ;
statusbar.ForegroundColor = Colors.Blue; //信号 时间等绘制颜色
//statusbar.ProgressIndicator.Text = "test"; //显示提示字和 。。。
//statusbar.ProgressIndicator.ShowAsync();
}

参考:

1.https://blogs.msdn.microsoft.com/gianlucb/2015/10/08/uwp-windows-10-app-titlebar-and-status-bar-customization/

2.https://blogs.msdn.microsoft.com/amar/2014/05/11/status-bar-in-windows-phone-8-1/

3.https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.statusbar.aspx

uwp 沉浸式状态栏的更多相关文章

  1. Android中的沉浸式状态栏效果

    无意间了解到沉浸式状态栏,感觉贼拉的高大上,于是就是试着去了解一下,就有了这篇文章.下面就来了解一下啥叫沉浸式状态栏.传统的手机状态栏是呈现出黑色条状的,有的和手机主界面有很明显的区别.这一样就在一定 ...

  2. 分别用ToolBar和自定义导航栏实现沉浸式状态栏

    一.ToolBar 1.在build.gradle中添加依赖,例如: compile 'com.android.support:appcompat-v7:23.4.0' 2.去掉应用的ActionBa ...

  3. 81.Android之沉浸式状态栏攻略

    转载:http://blog.csdn.net/lmj623565791/article/details/48649563/ 一.概述 近期注意到QQ新版使用了沉浸式状态栏,ok,先声明一下:本篇博客 ...

  4. android沉浸式状态栏设置(4.4以上版本)

    其实设置比较简单,我用了小米和htc的几款机型都可以用. 主要代码就是这个(注意要在Activity的setContentView之前调用才行) /** * 开启沉浸式状态栏 * */ public ...

  5. Android 沉浸式状态栏 实现方式二 ( 更简单 )

    以前写过一个沉浸式状态栏 的实现方式 Android 沉浸式状态栏 实现方式一 现在有个更为简单的实现方式 . 相关链接 http://www.apkbus.com/forum.php?mod=vie ...

  6. Android 4.4沉浸式状态栏的实现

    要实现Android 4.4上面的沉浸式状态栏要用到开源项目SystemBarTint(https://github.com/hexiaochun/SystemBarTint) public clas ...

  7. Android 中沉浸式状态栏实现

    Android 中沉浸式状态栏实现方式如下 计算状态栏高度及调用沉浸式状态栏的相关API方法 package com.example.status; import android.annotation ...

  8. Android 沉浸式状态栏

    1,传统的手机状态栏是呈现出黑色或者白色条状的,有的和手机主界面有很明显的区别.这样就在一定程度上牺牲了视觉宽度,界面面积变小.看一下QQ的应用 2,实现起来也挺简单的,来一起看一下吧 MainAct ...

  9. Android沉浸式状态栏实现

    Step1:状态栏与导航栏半透明化 方法一:继承主题特定主题 在Android API 19以上可以使用****.TranslucentDecor***有关的主题,自带相应半透明效果 例如: < ...

随机推荐

  1. css3-10 如何控制元素的显示和隐藏(display和visibility的区别是什么)

    css3-10 如何控制元素的显示和隐藏(display和visibility的区别是什么) 一.总结 一句话总结:使用的时候直接在元素的样式中设置display和visibility属性即可.推荐使 ...

  2. angular动画知识点以及代码样例

    原文地址 https://www.jianshu.com/p/4400174072e2 大纲 1.angular动画的相关概念 2.angular动画的绑定方式 3.angular动画代码实例 1.a ...

  3. URL validation failed. The error could have been caused through the use of the browser&#39;s navigation

    URL validation failed. The error could have been caused through the use of the browser's navigation ...

  4. TextView之一:子类的常用属性 分类: H1_ANDROID 2013-10-30 15:14 770人阅读 评论(0) 收藏

    TextView常见的子类包括EditText,Button,CheckBox, RadioButton等. 1.EditText EditText继承自TextView,因此TextView所有属性 ...

  5. Android 自定义RadioButton样式

     上面这种3选1的效果如何做呢?用代码写? 其实有更简单的办法,忘了RadioButton有什么特性了吗? 我就用RadioButton实现了如上效果,其实很简单的. 首先定义一张background ...

  6. [Grid Layout] Use the repeat function to efficiently write grid-template values

    We can use the repeat() function if we have repeating specifications for columns and rows. With the  ...

  7. Java多线程编程— 概念以及经常使用控制

    多线程能满足程序猿编写很有效率的程序来达到充分利用CPU的目的,由于CPU的空暇时间可以保持在最低限度.有效利用多线程的关键是理解程序是并发运行而不是串行运行的.比如:程序中有两个子系统须要并发运行, ...

  8. Qt5.4.2编译 qtpropertybrowser-2.51(从4修改到5的除错过程)

    qtpropertybrowser是一个洛基亚时代的一个产物,其实它就是QtDesigner侧栏那种样子而已.网上大部分的都只适用于Qt4,今天头脑发热想用Qt5编译一下,发觉一大堆错误,因为Qt4有 ...

  9. python 单向循环列表

    # -*- coding: utf-8 -*- # @author: Tele # @Time : 2019/04/23 下午 6:54 # 单向循环列表 # 单向循环列表与单向列表的不同之处在于最后 ...

  10. 创建数据库以及其属性的sql语句

    创建数据库的SQL语句: create database stuDB on primary -- 默认就属于primary文件组,可省略 ( /*--数据文件的详细描写叙述--*/ name='stu ...