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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:03:58+00:00 2026-05-28T07:03:58+00:00

I am working on a WPF application with MVVM, but am not using any

  • 0

I am working on a WPF application with MVVM, but am not using any of MVVM frameworks like MVVM light etc. I have created user controls that host atleast 8 to 9 controls and this is displayed in a ItemControl in the main window. The main window has save and close buttons. I have implemented Custom DataValidation, and if any of the controls has data validation, it disables the Save button. This works as expected in all the other controls but not working for ItemControl. The user control has data validations and displaying validation errors but I am not able to disable the save button. Any help will be really appreciated. Please let me know if you need additional details.

  • 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-05-28T07:03:58+00:00Added an answer on May 28, 2026 at 7:03 am

    To enable or disable button, you must consider using MVVM Commands.

    They will allow you to bind a command to a button (such as Save) with a CanExecute() delegate function. This CanExecute() can check if any of the user controls on the ItemsControl is invalid (using the validity properties of the user controls) and then return false.

    CanExecute() gets fired on almost every opportunity of rendering of the UI and hence it is kind of observable.

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

Sidebar

Related Questions

I'm working on an WPF application using the mvvm-light framework. I'm new to both
I'm working on a WPF application, and I'm structuring it using the MVVM pattern.
I'm building a WPF application and working with the MVVM pattern. I have 4
I am currently working on an application using WPF and MVVM. Now if I
I have a working WPF application. I would like to see it running as
I am working on a client/server (WPF/WCF) application using the MVVM pattern. Properties on
I'm using WPF and MVVM in an application I'm working on. I was creating
I have an application I am creating in WPF, using MVVM pattern. In this
What I have so far is: A WPF application, using MVVM, IDataErrorInfo implemented. Everything
I'm working on my first big WPF MVVM application now, which uses MVVM Light

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.