.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> WPF >> Post New QuestionBookmark and Share Subscribe to Forum

Requred field Validation in WPF+MVVM

Posted By: Rahman     Posted Date: November 24, 2010    Points:2   Category :WPF
I have a Xaml Page.
Where I have One TextBox Control,One ComboBox control,And One Save
button.Text Box and the combo box control is the Mandatory field.
So these fields are empty the Save button should be disable.If u put any thing in TextBox and the combobox then only the Mandatory field symbol goes off and the button become enable.
Here I am using MVVM pattern....

Please help me ...
I am waiting for reply


Responses
Author: sravani             
Posted Date: November 24, 2010     Points: 5   

you can create a boolean property in your view model; in your xaml, bind the save button's IsEnabled event to that property of view model; and in your required field validation logic keep changing boolean property so as to when
to disable and enable the save button depending on your validation



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend