Exemplo n.º 1
0
        //respond to changes on the model's properties
        void note_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
            case "X":
                RaisePropertyChanged("Left");
                break;

            case "Y":
                RaisePropertyChanged("Top");
                break;

            case "Text":
                RaisePropertyChanged("Text");
                break;

            case "IsSelected":
                RaisePropertyChanged("IsSelected");
                break;

            case nameof(NoteModel.PinnedNode):
                RaisePropertyChanged(nameof(this.PinnedNode));
                PinToNodeCommand.RaiseCanExecuteChanged();
                break;
            }
        }
Exemplo n.º 2
0
 private void SelectionOnCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     CreateGroupCommand.RaiseCanExecuteChanged();
     AddToGroupCommand.RaiseCanExecuteChanged();
     UngroupCommand.RaiseCanExecuteChanged();
     PinToNodeCommand.RaiseCanExecuteChanged();
 }