zoukankan      html  css  js  c++  java
  • wp 实现N秒无操作后自动隐藏控件

    public partial class a: PhoneApplicationPage
        {
            DispatcherTimer timer = new DispatcherTimer();
            public a()
            {
                timer = new DispatcherTimer();
                timer.Interval = TimeSpan.FromSeconds(10);
                timer.Tick += new EventHandler(timer_Tick);

                timer.Start();
            }

            protected override void OnManipulationStarted(ManipulationStartedEventArgs e)
            {
                base.OnManipulationStarted(e);
                timer.Stop();
                this.Search.Visibility = Visibility.Visible;
                SystemTray.IsVisible = true;
                this.ApplicationBar.IsVisible = true;

            }

            protected override void OnMouseLeave(MouseEventArgs e)
            {
                base.OnMouseLeave(e);
                timer.Interval = TimeSpan.FromSeconds(10);
                timer.Tick += new EventHandler(timer_Tick);

                timer.Start();
            }

            void timer_Tick(object sender, EventArgs e)
            {
                timer.Stop();
                this.Search.Visibility = Visibility.Collapsed;
                SystemTray.IsVisible = false;
                this.ApplicationBar.IsVisible = false;
            }
        }

  • 相关阅读:
    linux下安装elasticsearch5.6.3
    linux下安装git
    环境安装备忘录 Zookeeper
    环境安装备忘录 JDK
    环境安装备忘录 Tomcat
    MySql 通过show status 优化数据库性能
    MySQL执行计划解读 转他人文章
    2015年12月21日 my.cnf 配置
    mysql 如何查看my.cnf的 位置
    mysql状态查看 QPS/TPS/缓存命中率查看
  • 原文地址:https://www.cnblogs.com/lutter/p/2763089.html
Copyright © 2011-2022 走看看