コード例 #1
0
        private void QueryTextBox_TextChangedProgramatically(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
        {
            var textBox = ((Windows.UI.Xaml.Controls.TextBox)sender);

            textBox.SelectionStart = textBox.Text.Length;

            this._isTextSetProgramatically = false;
        }
コード例 #2
0
        private void TextBox_TextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
        {
            var textBox = sender as TextBox;

            if (textBox.Text == editor.WatermarkText)
            {
                textBox.Text = string.Empty;
            }
        }
コード例 #3
0
ファイル: EntryRenderer.cs プロジェクト: terrajobst/maui
 void OnNativeTextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs args)
 {
     if (Control.Text == _transformedText)
     {
         return;
     }
     _transformedText = Element.UpdateFormsText(Control.Text, Element.TextTransform);
     Element.SetValueCore(Entry.TextProperty, _transformedText);
 }
コード例 #4
0
        private void UserNameText_TextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
        {
            if (Countly.UserDetails.Name != UserNameText.Text)
            {
                Countly.UserDetails.Name = UserNameText.Text;

                Countly.AddBreadCrumb("username updated: " + UserNameText.Text);
            }
        }
コード例 #5
0
ファイル: MainPage.xaml.cs プロジェクト: miguelprades/retos
        /// <summary>
        /// Impide que se puedan introducir dígitos inválidos (que no estén entre 1 y 9) en las celdas del tablero
        /// </summary>
        /// <param name="sender">El campo de texto en el que se introduce el dígito</param>
        /// <param name="e">Este parámetro es ignorado</param>
        private void OnTextBoxChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
        {
            TextBox textBox = sender as TextBox;
            string  text    = textBox.Text;

            int result;

            if (string.IsNullOrWhiteSpace(text) || !int.TryParse(text, out result) || (result < 1) || (result > 9))
            {
                textBox.Text = string.Empty;
            }
        }
コード例 #6
0
        private void QueryTextBox_TextChangedByUserInput(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
        {
            var text = ((Windows.UI.Xaml.Controls.TextBox)sender).Text;

            //To clear the auto-suggest immediately instead of waiting for selection changed
            if (text == String.Empty)
            {
                _launcher.AutoCompleteTextBlock.Text = String.Empty;
            }

            _viewModel.QueryText = text;
            var latestTimeOfTyping = DateTime.Now;

            Task.Run(() => DelayedCheck(latestTimeOfTyping, text));
            s_lastTimeOfTyping = latestTimeOfTyping;
        }
コード例 #7
0
 private void usdBox_TextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
 {
     if (!flag)
     {
         try
         {
             double usd = double.Parse(usdBox.Text);
             btcBox.Text = Math.Round((usd / rate), 3).ToString();
             flag        = true;
         }
         catch
         {
             // Do Nothing
         }
     }
     else
     {
         flag = false;
     }
 }
コード例 #8
0
        void OnTextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs textChangedEventArgs)
        {
            if (IsPassword)
            {
                // If we're not on a phone, we can just obfuscate any input
                if (Device.Idiom != TargetIdiom.Phone)
                {
                    string updatedRealText = DetermineTextFromPassword(Text, base.Text);

                    if (Text == updatedRealText)
                    {
                        // Nothing to do
                        return;
                    }

                    Text = updatedRealText;

                    string updatedText = Obfuscate();

                    if (base.Text != updatedText)
                    {
                        base.Text      = updatedText;
                        SelectionStart = base.Text.Length;
                    }

                    return;
                }

                // If we are on the phone, we might need to delay obfuscating the last character
                DelayObfuscation();
            }
            else if (base.Text != Text)
            {
                // Not in password mode, so we just need to make the "real" text match
                // what's in the textbox; the internalChange flag keeps the TextProperty
                // synchronization from happening
                _internalChangeFlag = true;
                Text = base.Text;
                _internalChangeFlag = false;
            }
        }
コード例 #9
0
 void OnNativeTextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs args)
 {
     Element.SetValueCore(Editor.TextProperty, Control.Text);
 }
コード例 #10
0
 private void TextBoxOnTextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs textChangedEventArgs)
 {
     Element.Text = _textBox.Text;
 }
コード例 #11
0
 private async void EndpointChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
 {
     await SaveChanges();
 }
コード例 #12
0
 void SearchBarExtRenderer_TextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
 {
     this.FormsView.Text = (sender as TextBox).Text;
 }
コード例 #13
0
 private void CipherText_TextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
 {
     (DataContext as ViewModel).Decrypt((sender as TextBox).Text);
 }