zoukankan      html  css  js  c++  java
  • Windows 10 UWP程序标题栏设置

    在Windows 10程序中,以前只能用于全屏方式的Metro程序现在可以运行在窗口模式下了,并且改了个新名字,叫Windows 通用程序(Universal Windows app),简称UWP程序。新的UWP程序虽然大体上还是和以前的Metro程序差不多的,但还是引入了一点新东西的,本文这里就介绍一下它的标题栏设置的几个特性。

     隐藏标题栏:

    将应用界面扩展至 Titlebar 区域

        CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;

    修改标题栏颜色:

        var tiWtleBar = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().TitleBar;
        titleBar.BackgroundColor = Colors.DarkBlue;
        titleBar.ForegroundColor = Colors.White;
        titleBar.ButtonHoverBackgroundColor = Colors.LightBlue;
        titleBar.ButtonBackgroundColor = Colors.Maroon;
        titleBar.ButtonForegroundColor = Colors.White;

     

    自定义标题栏控件:

    可以将界面中任意控件指定为标题栏,指定后该控件将具有标题栏的行为特性,如拖动窗口、右键弹出窗口操作菜单等。

        Window.Current.SetTitleBar(grid);

  • 相关阅读:
    Codeforces 424C(异或)
    CodeForces
    Codeforces 424A (思维题)
    HDU 1197 Specialized Four-Digit Numbers
    ZOJ 2301 Color the Ball 线段树(区间更新+离散化)
    HDU 1106 排序
    Codefroces 831B Keyboard Layouts
    POJ 1082 Calendar Game
    HDU 多校联合 6045
    HDU 5976 Detachment
  • 原文地址:https://www.cnblogs.com/TianFang/p/4732471.html
Copyright © 2011-2022 走看看