Send a empty Message or Notification with MVVM toolkit light

Posted by msfanboy on Stack Overflow See other posts from Stack Overflow or by msfanboy
Published on 2010-05-31T20:19:38Z Indexed on 2010/05/31 20:23 UTC
Read the original article Hit count: 391

Filed under:
|
|
|
|

Hello Laurent ;-)

I could not find any Ctor of Messenger or Notification class to send a empty message.

ViewModel1:

 private int _selectedWeeklyRotation;
    public int SelectedWeeklyRotation
    {
        get { return _selectedWeeklyRotation; }
        set
        { 
            if(_selectedWeeklyRotation == value)
                return;

            _selectedWeeklyRotation = value;
            this.OnPropertyChanged("SelectedWeeklyRotation");
            if(value > 1)
                Messenger.Default.Send();                     
        }
    }

ViewModel2:

Ctor:

Messenger.Default.Register(this, CreateAnotherTimeTable);

private void CreateAnotherTimeTable() {

}

I just need to send a Notification to another ViewModel, no sending of data at all.

Is that possible with mvvm light toolkit library?

© Stack Overflow or respective owner

Related posts about mvvm

Related posts about message