Skip to content

Instantly share code, notes, and snippets.

@TBertuzzi
Last active November 11, 2019 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TBertuzzi/232d6fc8fb8aad9db2a00f9d16ab6345 to your computer and use it in GitHub Desktop.
Save TBertuzzi/232d6fc8fb8aad9db2a00f9d16ab6345 to your computer and use it in GitHub Desktop.
EventAggregator
string _loadingText = "Carregando...";
public string LoadingText
{
get { return _loadingText; }
set { SetProperty(ref _loadingText, value); }
}
protected MainViewModel(IEventAggregator ea)
{
ea.GetEvent<MessageSentEvent>().Subscribe(MessageReceived);
}
private void MessageReceived(string parametro)
{
var mensagem = parametro;
LoadingText = parametro;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment