Пример #1
0
 /// <summary>
 /// Clear the text field, set Value to default(T) and Text to null
 /// </summary>
 /// <returns></returns>
 public Task Clear()
 {
     if (_mask == null)
     {
         return(InputReference.SetText(null));
     }
     else
     {
         return(_maskReference.Clear());
     }
 }
Пример #2
0
 /// <summary>
 /// Sets the input text from outside programmatically
 /// </summary>
 /// <param name="text"></param>
 /// <returns></returns>
 public Task SetText(string text)
 {
     if (_mask == null)
     {
         return(InputReference?.SetText(text));
     }
     else
     {
         return(_maskReference.Clear().ContinueWith(t => _maskReference.OnPaste(text)));
     }
 }
Пример #3
0
        /// <summary>
        /// Sets the input text from outside programmatically
        /// </summary>
        /// <param name="text"></param>
        /// <returns></returns>
        public async Task SetText(string text)
        {
            if (_mask == null)
            {
                if (InputReference != null)
                {
                    await InputReference.SetText(text);
                }
                return;
            }
            await _maskReference.Clear();

            _maskReference.OnPaste(text);
        }