/// <summary>
 /// Invoked when the cursor position gets changing.
 /// </summary>
 /// <param name="sender">Masked edit.</param>
 /// <param name="e">CursorPositionChangingEventArgs.</param>
 private void SfPhone_CursorPositionChanging(object sender, CursorPositionChangingEventArgs e)
 {
     if (e.NewValue <= 1 && !(e.NewValue == 0 && e.OldValue == sfPhone.Mask.Length))
     {
         e.Cancel = true;
     }
 }
Example #2
0
 /// <summary>
 /// Invoked when the cursor position gets changing.
 /// </summary>
 /// <param name="sender">Masked edit.</param>
 /// <param name="e">CursorPositionChangingEventArgs.</param>
 private void SfPhone_CursorPositionChanging(object sender, CursorPositionChangingEventArgs e)
 {
     if (e.NewValue <= 1)
     {
         e.Cancel = true;
     }
 }