Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Reply
Comunicating Between ViewModels
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Bryan Batts
8y
272
1
Reply
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.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How to make visible a text box while a checkbox is checked ?
Clickonce Deployement - Oracle database connection failure