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 7811449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:09:59+00:00 2026-06-02T04:09:59+00:00

(Using WPF application) This is the situation: There are 3 user input fields. 1

  • 0

(Using WPF application)
This is the situation:

There are 3 user input fields. 1 for hours, 1 for minutes and 1 for seconds.
Behind it is a checkbox for “divide time by half” that does nothing more than devide the timespan created by the user input by half.

But when the checkbox gets checked, i first make a check in the code if the user had put in any numbers in the fields: hours/minutes/seconds.
If all are 0, a messagebox pops up telling the user he needs to put in something.
But at this point, i want to “cancel” the checking of the checkbox.

Should i use something as e.Cancel or something ?
Or should i set the IsChecked back to false together with the messagebox ?

Im wondering wat the correct way of dealing with this is.

  • 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-02T04:10:00+00:00Added an answer on June 2, 2026 at 4:10 am

    I think your approach is wrong.
    The checkbox should enable only when there is valid input.
    You could set a LostFocus event on your textboxes and inside that event check the all the input values.
    If input is right then enable the checkbox else disable it. No need to cancel the checkmark

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

Sidebar

Related Questions

I'm using this code inside WPF application: public static string EncryptString(string stringToEncrypt) { SHA256
I'm using the ProgressBar control in a WPF application and I'm getting this old,
In my WPF application I have some drawing functionality. I have solved this using
I am installing a WPF Application using the ClickOnce deployment. There are certain settings
I'm going to do a wpf application using MVVM(It based on http://www.codeproject.com/KB/WPF/MVVMQuickTutorial.aspx ). This
Situation I'm creating a C#/WPF 4 application using a SQL Compact Edition database as
I'm working on a desktop project using WPF, framework 3.5. This application has lots
I'm building an application using WPF and MVVM. I've come across a situation where
(Using WPF application) The situation: Within a WPF application, i made a WPF usercontrol,
(using WPF application) I get an error when i want to save a bool

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.