private void SecondsTextChanged(object sender, TextCompositionEventArgs e)
{
//delete the text that is highlight(selected)
TrimSelectedText(seconds);
//Adjust the text according to the carrot index
string newText = AdjustText(seconds, e.Text);
//validates that the second is correct if not set a valid value (0 or 59)
int secNum = ValidateAndSetSeconds(newText);
//moves the carrot index or focus the neighbour
AdjustCarretIndexOrMoveToNeighbour(seconds, null);
//handle the event so that it does not set the text, since we do it manually
e.Handled = true;
}