public PageCallback() { InitializeComponent(); MainWindow.Instance.SetupPage(this, ButtonBack); textBoxData = new TextBox(); textBoxData.TextChanged += TextBoxData_TextChanged; Loaded += (s, e) => { (Application.Current.MainWindow as MainWindow).SetupTitle(string.Empty, "Можем ли мы перезвонить Вам?"); onscreenKeyboard = new OnscreenKeyboard(ActualWidth, BorderKeyboard.ActualHeight, 0, 0, 9, 30, OnscreenKeyboard.KeyboardType.Numbers); Canvas canvasKeyboard = onscreenKeyboard.CreateOnscreenKeyboard(); canvasKeyboard.HorizontalAlignment = HorizontalAlignment.Stretch; canvasKeyboard.VerticalAlignment = VerticalAlignment.Center; Grid.SetRow(canvasKeyboard, 2); Grid.SetColumn(canvasKeyboard, 1); GridPhoneNumber.Children.Add(canvasKeyboard); onscreenKeyboard.SetTextBoxInput(textBoxData); TextBoxPhoneNumber.Focus(); }; MainWindow.ApplyStyleForButtons(new List <Button> { ButtonNext, ButtonClear }); MainWindow.ApplyStyleForButtons(new List <Button> { ButtonNo, ButtonYes }, 50); }
/// <summary> Обработчик двойного нажатия мыши TextBoxPhoneNumber </summary> private void TextBoxPhoneNumber_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { TextBoxPhoneNumber.SelectAll(); }