Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
[WPF] DispatcherTimer and upgrade label
Roberto Salemi
Mar 20 2015 12:22 PM
1.3k
Reply
Hi,
I'm using a DispatcherTimer in my UserControl:
DispatcherTimer dispatcherTimer = new DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0, 0, 60);
dispatcherTimer.Tick += timer_Tick;
dispatcherTimer.Start();
private void dispatcherTimer_Tick(object sender, EventArgs e)
{
CommandManager.InvalidateRequerySuggested();
myOtherUserControl uc = VisualTreeHelpers.FindChild<myOtherUserControl>(this);
uc.SearchByTimer();
//uc.timerLabel.Text = label_to_do_refresh!
}
The timer works, but I would show the countdown in timerLabel.
How can I procede?
Thanks.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to export datagrid to cvs file on WPF
Setting a style on a single element