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