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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:33:57+00:00 2026-06-04T20:33:57+00:00

There is a checkbox in my form, which is bound two-ways to a boolean

  • 0

There is a checkbox in my form, which is bound two-ways to a boolean value in my model. There is a special case, where the user clicks on the checkbox, is presented a question, and may answer “no”. In this case, the action fails, and the checkbox should not be checked.

I have tried with several variations of this, but it won’t work, in the sense that the model is correctly set to false, but the checkbox in the UI gets checked anyway.

private bool _isName = false;
public bool isName {
  get { return _isName; }
  set {
    if (value && specialCase) {
        if(user answers no)
          value = false;
    }
    _isName = value;
    NotifyPropertyChanged("isName");
  }
}

How can I do this?

  • 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-04T20:33:59+00:00Added an answer on June 4, 2026 at 8:33 pm

    Create custom MessageBox which will get as a parameter cancellation command and command which you will invoke in case user input is positive. Then create two additional methods to ViewModel which will be responsible for changing isName property. In xaml add EventTrigger to CheckBox on Click event within which show custom MessageBox. Then bind commands that are responsible for changing property to MessageBox.

    If you need some code samples or more clarification – I’ll provide them.

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

Sidebar

Related Questions

Is there a case when IsChecked property on WPF CheckBox null ? I guess
I have a form which contains some rows, each has a checkbox in the
I have a form which collects user info including name, location, url, email address
I have a simple user signup form with a checkbox that lets users get
I have a little checkbox on a signup form im creating which 'must' be
In Spring MVC 3.0, there is a class org.springframework.validation.BindingResult which finds the form parameters.
I have an issue with model binding a checkbox from a form to an
I have two sections(primary and secondary) in a form with several textboxes which display
I have a form with containing a datalist which is bound to a datasource
I want to set checkbox to be checked for form rendered for specific value

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.