TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jeevan mummadi
NA
157
0
How to apply a validation rule for control in WPF-MVVM
Mar 23 2013 1:18 PM
Hi All,
Currently I am working on WPF with MVVM patern. I created one sample apps like this
View
------
<TextBox Grid.Row="0" Grid.Column="1" Width="100" HorizontalAlignment="Center" Text="{Binding Student.Name, Mode=TwoWay}"/>
ViewModel
--------------
public Student Student
{
get
{
return _student;
}
set
{
_student = value;
NotifyPropertyChanged("Student");
}
}
Model
--------
public class Student
{
public string Name { get; set; }
}
Can you please any one explain about how to validate a property for example "Name"
We have to apply validation rule in ViewModel or Model level.
Reply
Answers (
0
)
Sorting issue in wpf grid
WPF MediaElement and Subtitle