示例#1
0
 private void WhenDataContextChanged(object o, EventArgs args)
 {
     ScoreViewModel                    = (ScoreViewModel)DataContext;
     ScoreViewModel.View               = this;
     TabControl                        = this.FindControl <TabControl>("TabControl");
     TabControl.SelectionChanged      += TabItemChanged;
     DragAndDropContext                = ScoreViewModel.DragAndDropContext;
     DragAndDropContext.MouseReleased += AddItemOnScore;
     DragAndDropContext.MousePressed  += OnPress;
 }
示例#2
0
 public MusicItemViewModel(string imagePath, DragAndDropContext dragAndDropContext) : this(imagePath)
 {
     DragAndDropContext = dragAndDropContext;
 }