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 解压命令
    在xampp集成环境下使用 thinkphp 连接oracle
    输入框实现新闻列表分页显示(一)
    MyEclipse获取注册码
    Oracle数据库创建表空间
    SQL Server之存储过程
    连接Oracle数据库帮助类
    Oracle数据库的导入和导出
    创建dml触发器
    java连接数据库步骤
  • 原文地址:https://www.cnblogs.com/lutter/p/2763089.html
Copyright © 2011-2022 走看看