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
Bryan Batts
NA
7
569
Comunicating Between ViewModels
Aug 17 2016 1:20 PM
Hello.
I have a main ViewModel that loads two seperate child viewmodels. like so:
/// <summary>
/// Used to load edit/list user ViewModels.
/// </summary>
public
MVVM.ViewModelBase ViewModel
{
get
{
return
viewModel; }
set
{
viewModel = value;
RaisePropertyChanged(
"ViewModel"
);
}
}
MVVM.ViewModelBase viewModel;
public
UsersViewModel()
{
this
.ViewModel =
new
UsersListViewModel();
}
/// <summary>
/// Adds a new user
/// </summary>
void
addUserExecute()
{
ViewModel =
new
UsersEditViewModel(-1);
}
bool
canAddUserExecute()
{
return
true
;
}
public
ICommand AddUser {
get
{
return
new
MVVM.RelayCommand(addUserExecute, canAddUserExecute); } }
I can't seem to figure out how to let my child (UsersEditViewModel) to tell the parent that i'm done editing and need to close/dispose.
Any help would be greatly appreciated.
Reply
Answers (
2
)
How to make visible a text box while a checkbox is checked ?
Clickonce Deployement - Oracle database connection failure