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的固定占据而显得呆板了

    想了解更多?点我

  • 相关阅读:
    关于表单的jQuery练习
    jQuery中的综合动画
    jQuery中自定义简单动画的实现
    清除浮动
    定位
    盒子模型
    笔记
    笔记
    翻页
    DOM
  • 原文地址:https://www.cnblogs.com/fifa0329/p/4536677.html
Copyright © 2011-2022 走看看