private void PlaylistCanvas_PlacePatternRequested(object sender, PlacePatternRequestedEventArgs e) { PlaylistViewModel vm = (PlaylistViewModel)DataContext; vm.PlacePattern(e.Pattern, e.TrackIndex, e.Start); }