public PageComment()
        {
            InitializeComponent();
            MainWindow.Instance.SetupPage(this, ButtonBack);

            Loaded += (s, e) => {
                (Application.Current.MainWindow as MainWindow).SetupTitle(string.Empty, "Желаете ли Вы оставить комментарий к своей оценке?");

                onscreenKeyboard = new OnscreenKeyboard(ActualWidth, BorderKeyboard.ActualHeight, 0, 0, 9, 30, OnscreenKeyboard.KeyboardType.Full);
                Canvas canvasKeyboard = onscreenKeyboard.CreateOnscreenKeyboard();
                canvasKeyboard.HorizontalAlignment = HorizontalAlignment.Stretch;
                canvasKeyboard.VerticalAlignment   = VerticalAlignment.Center;
                Grid.SetRow(canvasKeyboard, 8);
                Grid.SetColumnSpan(canvasKeyboard, 5);
                GridComment.Children.Add(canvasKeyboard);
                onscreenKeyboard.SetTextBoxInput(TextBoxComment);

                TextBoxComment.Focus();
            };

            MainWindow.ApplyStyleForButtons(new List <Button> {
                ButtonNext, ButtonClear
            });
            MainWindow.ApplyStyleForButtons(new List <Button> {
                ButtonYes, ButtonNo
            }, 50);
        }
Beispiel #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Activate();
            TextBoxComment.Focus();

            _owner   = (MainWindow)Owner;
            _minLeft = _owner.Left + 10;
            _maxLeft = _owner.Left + _owner.Width - 10 - Width;
            _minTop  = _owner.Top + 10;
            _maxTop  = _owner.Top + _owner.Height - 10 - Height;

            SetPositionWindow();
        }