private void pageIndexTb_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e) { var textbox = (TextBox)sender; if (!String.IsNullOrEmpty(textbox.Text)) { if (e.OriginalKey == VirtualKey.Enter && e.KeyStatus.RepeatCount == 1) { searchModel.PageIndex = int.Parse(pageIndexTb.Text); JumpClicked?.Invoke(sender, null); } else if (!System.Text.RegularExpressions.Regex.IsMatch(textbox.Text, "^\\d*\\.?\\d*$")) { int pos = textbox.SelectionStart - 1; textbox.Text = textbox.Text.Remove(pos, 1); textbox.SelectionStart = pos; } } else { textbox.Text = "0"; } }
private void jump_Click(object sender, RoutedEventArgs e) { JumpClicked?.Invoke(sender, null); }
private void previousPage_Click(object sender, RoutedEventArgs e) { searchModel.PageIndex--; JumpClicked?.Invoke(sender, null); }
private void lastPage_Click(object sender, RoutedEventArgs e) { searchModel.PageIndex = searchModel.PageCount - 1; JumpClicked?.Invoke(sender, null); }
private void nextPage_Click(object sender, RoutedEventArgs e) { //NextClicked?.Invoke(sender,null); searchModel.PageIndex++; JumpClicked?.Invoke(sender, null); }