コード例 #1
0
        /// <summary>
        /// Sets the caret position on the just gotten focus.
        /// </summary>
        /// <param name="state"></param>
        /// <returns></returns>
        private void JumpCaretFromPartialEndToIntegerEnd(ProcessingState state)
        {
            if (FocusState != FocusState.JustGotten)
            {
                return;
            }
            if (state.Formatting.Text.IsNullOrEmpty())
            {
                return;
            }
            if (PartialDisabledCurrent)
            {
                return;
            }
            if (state.Formatting.CaretPosition != state.Formatting.Text.Length)
            {
                return;
            }

            state.Formatting.CaretPosition = state.GetIntegerEndPosition();
        }