Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8137181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:01:06+00:00 2026-06-06T11:01:06+00:00

I am trying to do a simple countdown timer from 1 minute, that is

  • 0

I am trying to do a simple countdown timer from 1 minute, that is shown in the button text. When the button is pressed I just want it to count down to 0, the show “times up”. I have been reading all the posts I can find trying to figure out how to do this and cannot. Can someone tell me what I am doing wrong.

This is in in visual c# windows phone application. I hope I made the post appear correctly, this is my first time to ask a question on this site, I am new to this. Thank you in advance for any advice.

void bTime_Click(object sender, RoutedEventArgs e)
    {
        DispatcherTimer timer1 = new DispatcherTimer();
        timer1.Interval = TimeSpan.FromSeconds(60);
        timer1.Tick += new EventHandler(timer_Tick);
        timer1.Start();
    }

    int tik = 60;
    void timer_Tick(object sender, EventArgs e)
    {
        bTime.Content = timer.ToString();
        if (tik > 0)
            Countdown.Text = (timer--).ToString();
        else
            Countdown.Text = "Times Up";
        throw new NotImplementedException();
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:01:08+00:00Added an answer on June 6, 2026 at 11:01 am

    First, get rid of throw new NotImplementedException. Second, you need to decrement tik. So something like this:

        DispatcherTimer timer1 = new DispatcherTimer();
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            timer1.Interval = new TimeSpan(0, 0, 0, 1);
            timer1.Tick += new EventHandler(timer1_Tick);
            timer1.Start();
        }
    
        int tik = 60;
        void timer1_Tick(object sender, EventArgs e)
        {
            Countdown.Text = tik + " Seconds Remaining";
            if (tik > 0)
                tik--;
            else
                Countdown.Text = "Times Up";
        }
    

    I have changed Interval and i’m decrementing tik every second. Nice and simple. Hope it helps. Let me know if you don’t understand.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a simple timer in javascript that counts down from 5
I'm trying to make a timer count down from 5 seconds to zero before
I'm trying to figure out a way to display a simple countdown that displays
I want to get just the filename using regex, so I've been trying simple
I'm trying to write a simple timer app. I'm creating a counter class that
I'm trying to show a simple countdown from 2 hours like so: $(function ()
I am trying this simple tutorial from oracle : http://www.oracle.com/technetwork/java/socket-140484.html (the Example 1 ).
I am trying a simple move as shown below and get the following error:
I am just trying a simple application, to make the browser fullscreen. this is
I am trying a simple Jekyll plugin: class MonthlyArchives < Liquid::Tag def initialize(tag_name, text,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.