none
WPF Timer missing in toolbox RRS feed

  • Question

  • I recently downloaded Visual Studio 2019 for C#. In 2010 I was using timer from toolbox and it was working fine. In 2019 I do not see any option for timer in WPF Components to add. I research in support community and I did not see any resolution on how to add this items. Any help I would greatly appreciated.

    Thank you,


    Friday, October 18, 2019 7:16 PM

Answers

  • Thanks!  I totally get it. I was hoping I can use the toolbox so it can populate the information in code page. Just becoming lazy.  Will give it try.

    • Marked as answer by j123() Friday, October 18, 2019 7:47 PM
    Friday, October 18, 2019 7:47 PM

All replies

  • System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
    dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
    dispatcherTimer.Interval = new TimeSpan(0,5,0);
    dispatcherTimer.Start();
    
    
    private void dispatcherTimer_Tick(object sender, EventArgs e)
    {
      // code goes here
    }

    Source

    Friday, October 18, 2019 7:39 PM
  • Thanks!  I totally get it. I was hoping I can use the toolbox so it can populate the information in code page. Just becoming lazy.  Will give it try.

    • Marked as answer by j123() Friday, October 18, 2019 7:47 PM
    Friday, October 18, 2019 7:47 PM