I am implementing an application, and if I click on a menu item:
<MenuItem Name="menuAlgemeneGeg" Header="Algemene gegevens" Click="AlgemeneGegevensClick" />
the method is :
private void AlgemeneGegevensClick(object sender, RoutedEventArgs e)
{
ToetsBeheerViewModel vm = (ToetsBeheerViewModel)this.DataContext;
EditAlgemeneGegevens window = new EditAlgemeneGegevens(vm.Examination);
window.ShowDialog();
menuAlgemeneGeg.IsEnabled = false;
}
Now what I want is, that when you click on it the menuitem is disabled. But from the moment the user closes this window it must be enabled again. I can disable the menuitem but can’t change this back to enable it.
Someone who can help me out please?
you can handle window closed event.. and enable menu in even handler