public EditTaskListPage() { InitializeComponent(); //this.Title = EditTaskListPageModel.Instance.ActiviyName; BindingContext = new EditTaskListPageModel(); // NavigationPage.SetHasNavigationBar(this, false); //NavigationPage.SetBackButtonTitle(this, ""); assignmentsList.ItemTapped += (object sender, ItemTappedEventArgs e) => { // don't do anything if we just de-selected the row if (e.Item == null) { return; } // do something with e.SelectedItem ((ListView)sender).SelectedItem = null; // de-select the row }; MyEditor.Unfocused += (object sender, FocusEventArgs e) => { MyScrollView.ScrollToAsync(MyEditor, ScrollToPosition.Start, true); }; MyEditor.Focused += (object sender, FocusEventArgs e) => { MyScrollView.ScrollToAsync(MyEditor, ScrollToPosition.Start, true); }; }
private void ScrollView_OnPropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == nameof(ScrollView.ContentSize)) { MyScrollView.ScrollToAsync(CmdBox, ScrollToPosition.End, true); } }
async void Handle_Scrolled(object sender, ScrolledEventArgs e) { if ((WasFocused && e.ScrollY > 12) || (string.IsNullOrWhiteSpace(ReplyEditor.Text) && e.ScrollY > 12)) { await MyScrollView.ScrollToAsync(0, 0, true); WasFocused = false; } }
public TaskContentPage() { InitializeComponent(); BindingContext = new TaskContentPageModel(); assignmentsList.ItemTapped += (object sender, ItemTappedEventArgs e) => { // don't do anything if we just de-selected the row if (e.Item == null) { return; } // do something with e.SelectedItem ((ListView)sender).SelectedItem = null; // de-select the row }; MyEditor.Unfocused += (object sender, FocusEventArgs e) => { MyScrollView.ScrollToAsync(MyEditor, ScrollToPosition.Start, true); }; MyEditor.Focused += (object sender, FocusEventArgs e) => { MyScrollView.ScrollToAsync(MyEditor, ScrollToPosition.Start, true); }; }
public async Task ScrollToEnd() { await SVmain.ScrollToAsync(0, double.MaxValue, true); await SVmain.ScrollToAsync(0, double.MaxValue, false); }