/// <summary>
        /// Sets a value to the textbox
        /// </summary>
        /// <param name="item">Object to set to textbox</param>
        private void SetValueByItem(object item)
        {
            //if item is not valid
            if (item == null)
            {
                sourceTextBox.SetValue(SuggestionBoxBehavior.SelectedItemProperty, item);
                //exit method
                return;
            }
            //mark a flag as we are changing values
            suppressTextChange = true;
            //see if we have suggestion provider
            if (suggestionProvider == null)
            {
                //if not then set the generic ToString() value
                sourceTextBox.Text = item.ToString();
            }
            else
            {
                //otherwise ask provider to generate a value
                sourceTextBox.Text = suggestionProvider.GetDisplayValue(item);
            }

            //update the caret position
            sourceTextBox.CaretIndex = sourceTextBox.Text.Length;
        }