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; }
public MusicItemViewModel(string imagePath, DragAndDropContext dragAndDropContext) : this(imagePath) { DragAndDropContext = dragAndDropContext; }