hello there,
I'm newbie in wpf application. I want to ask how to set dispatcherTimer.tick value from combo box. I have cboMinutes, the value is "10","20","30".
And now i want to set my dispatcherTime.Tick value is same with my cboMinutes value. so if i choose cboMinutes to "10", my dispatcherTimer.Tick value is 10.
Can someone help me please ? ?
Loading
Jaganathan BantheswaranPosted Aug 18, 2011, 2:52 AM
Write this code to combo box selection changed event.
DispatcherTimer _timer = new DispatcherTimer();
_timer.Tick += (s,e) =>
{
//Do your stuff here
});
_timer.Interval = TimeSpan.FromMinutes(Convert.ToDouble(combobox1.Text));
// Start the timer
_timer.Start();