|
Hi
I started to use Caliburn Micro today - very nice framework. But i ran into a problem:
public class ShellViewModel : Caliburn.Micro.Conductor<Caliburn.Micro.IScreen>.Collection.OneActive
{
protected override void OnInitialize()
{
DisplayName = "MyApplication 1.0";
}
public void ImportData()
{
ActivateItem(new DataImportViewModel());
}
public bool CanImportData()
{
return this.GetChildren().Where(screen => screen is DataImportViewModel).Count() == 0;
}
}
I want to deactivate the menu item in my Shell window if there is already an opened Data Import. The problem is that "CanImportData" is just called at the application startup and never again.
How can i force that its called?
Thanks
Michael
|