private void RegisterNoteItems() { TrackNameBox.Text = CurrentTrack.TrackName; TrackLevelBox.Text = CurrentTrack.TrackLevel.ToString(); TrackBPMBox.Text = CurrentTrack.TrackBPM.ToString(); TrackNPSBox.Text = CurrentTrack.TrackNPB.ToString(); TrackLengthBox.Text = CurrentTrack.TrackLength.ToString(); UPS.ItemsSource = CurrentTrack.GetNotes(Keys.S, Direction.UP); UPD.ItemsSource = CurrentTrack.GetNotes(Keys.D, Direction.UP); UPF.ItemsSource = CurrentTrack.GetNotes(Keys.F, Direction.UP); UPSPACE.ItemsSource = CurrentTrack.GetNotes(Keys.SPACE, Direction.UP); UPJ.ItemsSource = CurrentTrack.GetNotes(Keys.J, Direction.UP); UPK.ItemsSource = CurrentTrack.GetNotes(Keys.K, Direction.UP); UPL.ItemsSource = CurrentTrack.GetNotes(Keys.L, Direction.UP); UpScroll.ScrollToBottom(); DOWNS.ItemsSource = CurrentTrack.GetNotes(Keys.S, Direction.DOWN); DOWND.ItemsSource = CurrentTrack.GetNotes(Keys.D, Direction.DOWN); DOWNF.ItemsSource = CurrentTrack.GetNotes(Keys.F, Direction.DOWN); DOWNSPACE.ItemsSource = CurrentTrack.GetNotes(Keys.SPACE, Direction.DOWN); DOWNJ.ItemsSource = CurrentTrack.GetNotes(Keys.J, Direction.DOWN); DOWNK.ItemsSource = CurrentTrack.GetNotes(Keys.K, Direction.DOWN); DOWNL.ItemsSource = CurrentTrack.GetNotes(Keys.L, Direction.DOWN); UpdateTitle(false); }
private async void UpScroll_Clicked(object sender, EventArgs e) { try { await scrollView.ScrollToAsync(layout0, ScrollToPosition.Start, true); await UpScroll.FadeTo(0); UpScroll.IsVisible = false; } catch { } }
protected override void OnParentSet() { base.OnParentSet(); try { if (Parent != null) { scrollView.ScrollToAsync(grid, ScrollToPosition.Start, true); UpScroll.FadeTo(0); UpScroll.IsVisible = false; } } catch { } }
private void UpScrollWheel(object sender, RoutedEventArgs e) { MouseWheelEventArgs m = (MouseWheelEventArgs)e; double offset = m.Delta * 2 / 3; double value = UpScroll.VerticalOffset; if (UPNoteCount > 0) { --UPNoteCount; return; } UPNoteCount = 8; if ((UpScroll.VerticalOffset <= UpScroll.ScrollableHeight * 0.1) && (offset > 0)) { NoteList.Reserve(ref CurrentTrack.GetNoteListRef(Direction.UP)); return; } UpScroll.ScrollToVerticalOffset(value - offset); }
private async void ScrollView_Scrolled(object sender, ScrolledEventArgs e) { try { if (e.ScrollY > 0) { await UpScroll.FadeTo(1); UpScroll.IsVisible = true; } else { await UpScroll.FadeTo(0); UpScroll.IsVisible = false; } } catch { } }
private void UpScrollLoaded(object sender, RoutedEventArgs e) { UpScroll.AddHandler(MouseWheelEvent, new RoutedEventHandler(UpScrollWheel), true); }