locked
Make Timer while application running in windows phone RRS feed

  • General discussion

  • In which event should i add timer to  execute while application running ?

    DesertQueen

    Wednesday, February 12, 2014 2:20 PM

All replies

  • If you want timer to start as soon as application is launched you can start the timer in Main() function.

    Rahber
    @Rahber

    Wednesday, February 12, 2014 2:38 PM
  • in windows phone app  is there Main() where ?

    DesertQueen

    Wednesday, February 12, 2014 2:40 PM
  • There is no main(), perhaps they're talking about the constructor?

    http://pauliom.wordpress.com

    Wednesday, February 12, 2014 8:52 PM
  • Sorry I meant the Constructor. 

    Thanks pkr2000 for correcting. Late night browsing issues.


    Rahber
    @Rahber

    Thursday, February 13, 2014 5:12 AM
  • Do you mean App()

    {

                    playTimer = new DispatcherTimer();
                    playTimer.Interval = TimeSpan.FromSeconds(5);
                    playTimer.Tick += this.OnPlayTimerTick;

    }


    DesertQueen

    Thursday, February 13, 2014 7:13 AM
  • That is one place you could put it, just be careful with timers, on mobile devices you want to be "still" as much as possible to conserve battery. Putting a 5 second timer in the app might be costly.

    http://pauliom.wordpress.com

    Thursday, February 13, 2014 1:55 PM