WPF 依赖属性 本帖最后由 sloveb520 于 2011-11-08 16:26:50 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 增加一个DispatcherTimer用来计时,然后到时间后判断按钮是否被点击过,没有的话,就跳转。using System.Windows.Threading;...DispatcherTimer tm = newDispatcherTimer();publicWindow1() { InitializeComponent(); } private voidWindow_Loaded(objectsender, RoutedEventArgse){ tm.Tick +=newEventHandler(tm_Tick); tm.Interval = TimeSpan.FromSeconds(60); tm.Start();}void tm_Tick(objectsender, EventArgse){ if(Button1.IsPressed) { //被按过 tm.Stop(); //跳转到其他页面 NavigationService.GetNavigationService(this).Navigate(new Uri("LoginWindow.xaml", UriKind.Relative)); } }... 100分 不刷新情况下的样式控制【喜欢挑战的来试试】 C#中SOCKET通信如何实现字体信息的通信 怎样从文本文件中读数据? 点击listbox的item发生的事件是否是listView1_SelectedIndexChanged 100分求梅花雨日历控件3.0版... 在线等待 怎么用C#实现QQ表情的列表框 sql内存问题,高手请进 请告诉我一下 类型问题2次提问,请高手和回答过的老朋友近来帮忙,急~~~ 如何调用硬件做一些事情。!? datagridview导出EXCEL WinForm中的DataGrid模拟excel单元格单击和双击事件
using System.Windows.Threading;...
DispatcherTimer tm = newDispatcherTimer();publicWindow1()
{
InitializeComponent();
}
private voidWindow_Loaded(objectsender, RoutedEventArgse)
{
tm.Tick +=newEventHandler(tm_Tick);
tm.Interval = TimeSpan.FromSeconds(60);
tm.Start();
}void tm_Tick(objectsender, EventArgse)
{
if(Button1.IsPressed)
{
//被按过
tm.Stop();
//跳转到其他页面
NavigationService.GetNavigationService(this).Navigate(new Uri("LoginWindow.xaml", UriKind.Relative));
}
}
...