zoukankan      html  css  js  c++  java
  • windows phone中,实现systemtray触摸后可见,几秒后消失的效果

    <phone:PhoneApplicationPage 
        x:Class="ewlan.PivotMainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
        xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
        xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        mc:Ignorable="d" 
        FontFamily="{StaticResource PhoneFontFamilyNormal}"
        FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}"
        SupportedOrientations="Portrait"  Orientation="Portrait"
    //只需要在需要修改的PAGE
    //对应的XAML中,添加以下代码
        shell:SystemTray.IsVisible="True"
        shell:SystemTray.Opacity="0"
        shell:SystemTray.ForegroundColor="Orange"
        >

    这里简单讲一下这关键的三个属性:

    • IsVisible 决定是否显示systemtray
    • ForegroundColor 前景色,决定systemtray的颜色,如右图,就是白色
    • 最关键的,Opacity,意思是透明度,这个属性一旦设置,systemtray便不会再占据你所设计页面的区域了,而是像平时我们使用WP手机那样,手指触摸后出现

    怎么样?这样的设计就不会因为systemtray的固定占据而显得呆板了

    想了解更多?点我

  • 相关阅读:
    Spring学习笔记
    deepin linux 下C开发环境配置
    deepin linux 15.3安装完eclipse启动报错An error has occurred.
    windows下安装vundle
    Tomcat 改服务器编码(Java 修改字符串编码格式)
    servlet request getQueryString 汉字的URI编码如何转码
    servlet request
    servlet awt随机图片验证码
    java获取unicode码
    技术总监
  • 原文地址:https://www.cnblogs.com/fifa0329/p/4536677.html
Copyright © 2011-2022 走看看