Skip to content

Instantly share code, notes, and snippets.

@gshackles
Created November 5, 2012 04:54
Show Gist options
  • Save gshackles/4015415 to your computer and use it in GitHub Desktop.
Save gshackles/4015415 to your computer and use it in GitHub Desktop.
public abstract class SubViewModelBase<TResult> : ViewModelBase
{
protected string MessageId { get; private set; }
protected SubViewModelBase(string messageId)
{
MessageId = messageId;
}
protected void Cancel()
{
ReturnResult(default(TResult));
}
protected void ReturnResult(TResult result)
{
var message = new SubNavigationResultMessage<TResult>(this, MessageId, result);
MessengerHub.Publish(message);
Close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment