捕捉Silverlight程序全屏显示时候按ESC退出全屏显示

App.Current.Host.Content.FullScreenChanged+= new xxxxx

例子:

App.Current.Host.Content.FullScreenChanged += FullScreenChanged;

 

 private void FullScreenChanged(object sender, EventArgs handler)
        {
            if (Application.Current.Host.Content.IsFullScreen)
            {
                TextBlock tb = LayoutRoot.FindName("txt_fullscreen") as TextBlock;
                tb.Text = "退出全屏";
            }
            else
            {
                TextBlock tb = LayoutRoot.FindName("txt_fullscreen") as TextBlock;
                tb.Text = "全屏";
            }
        }

 

 

 

posted @ 2013-06-28 10:54  吕川福  阅读(242)  评论(0编辑  收藏  举报