zoukankan      html  css  js  c++  java
  • WP7系统托盘和应用程序栏

    (一)系统托盘和应用程序栏
    系统托盘
    (1)显示系统级别的状态信息
    (2)Apps能隐藏和显示系统托盘Micosoft.Phone.Shell.SystemTray.IsVisible=true;
    应用程序栏
    (1)用于显示一些通用操作的区域
    (2)支持弹出菜单显示更多的操作
    (二)应用程序栏
    (1)使用ApplicationBar不要使用自建的菜单系统。
     (2)使用系统默认的主题颜色(白色前景色和透明的背景)
    (3)支持最多4个操作图标,但不是必须4个。菜单项最多为5个。所以操作最多为9个。超过9个就要考虑自己设计是否合理了
    (4)系统提供的的图标
    (5)当应用程序要支持本地化和国际化时,必须使用C#生成AppliationBar。
         因为ApplicationBar(不是继承自FrameElement)不支持数据绑定。    
    (6)使用Xaml创建ApplcationBar,用Expression Blend操作

    <phone:PhoneApplicationPage.ApplicationBar>
    <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0.5">
    <shell:ApplicationBarIconButton x:Name="VideoButton" IconUri="/icons/appbar.feature.video.rest.png" Text="视频" Click="VideoButton_Click"/>
    <shell:ApplicationBarIconButton x:Name="WebBrowser" IconUri="/icons/appbar.feature.search.rest.png" Text="浏览器" Click="WebBrowser_Click"/>
    <shell:ApplicationBar.MenuItems>
    <shell:ApplicationBarMenuItem x:Name="MusicMenuItem" Text="音乐" Click="MusicMenuItem_Click"/>
    <shell:ApplicationBarMenuItem x:Name="PirctureMenuItem" Text="图片" Click="PirctureMenuItem_Click"/>
    </shell:ApplicationBar.MenuItems>
    </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    (7)透明度
       透明度可以设置为0到1的数值,大his和推荐使用0,0.5和1
       如果透明度小于1,Application Bar会覆盖原显示区域,但同时能看到原显示区域
       如果等于1会覆盖原显示区域。
    (8)ApplicationBar与Orientation(屏幕方向)
        Application Bar支持横屏
        总是显示在硬件的一方
        当翻屏的时候自动显示动画效果

    运行截图

  • 相关阅读:
    [LC] 71. Simplify Path
    [LC] 225. Implement Stack using Queues
    [Coding Made Simple / LeetCode 1235] Maximum Profit in Job Scheduling
    [Coding Made Simple] Cutting Rod for max profit
    [Coding Made Simple] Longest Common Substring
    [GeeksForGeeks] Convert an array to reduced form
    [GeeksForGeeks] Find if there is a pair with a given sum in a sorted and rotated array.
    [Coding Made Simple] Optimal Binary Search Tree
    [GeeksForGeeks] Write a program to delete a tree
    [GeeksForGeeks] Check if two trees are Isomorphic
  • 原文地址:https://www.cnblogs.com/zhangmuyang/p/3585778.html
Copyright © 2011-2022 走看看