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进程间通信 --- 管道
    ARM常用汇编指令列表 --- 转自百度文库
    操作Linux系统环境变量的几种方法
    谈谈JAVA程序的反编译
    浅谈Java Virtual Machine
    使用非java代码编程
    java编程中常用英语单词
    linkin大话面向对象--类和对象
    Linkin大话Java和internet概念
    Linkin大话eclipse快捷键
  • 原文地址:https://www.cnblogs.com/lutter/p/2763089.html
Copyright © 2011-2022 走看看