I am developing an application with a tabcontrol, the shell will host this tabcontrol where workspaces will be shown. Now I have implemented the close strategy from the HelloScreens sample, this works fine when I close the whole application. But I also
added a close button to my tab header so the user can close indivual tabs. When the button is clicked the code below is executed in my shellviewmodel:
The problem is that the TryClose will not call my Close strategy method, but when I close the whole application it works fine?
protected virtual void DoCloseCheck(IDialogManager dialogs, Action<bool> callback)
Contracts.Services.Dialog.MessageBoxOptions selection = Dialogs.ShowMessageBox(
"There is unsaved data, do you want to close?",
box => callback(box.WasSelected(Contracts.Services.Dialog.MessageBoxOptions.Yes))
if (selection == Contracts.Services.Dialog.MessageBoxOptions.Yes)
this.IsDirty = false;
public override void CanClose(Action<bool> callback)
Could somebody give me some hints?
All my workspaces implement Screen and the IWorkspace interface and the ShellViewModel implements Conductor<IWorkspace>.Collection.OneActive.
Thanks in advance,