Expose the Textbox's MaxLength property to limit text input on the RadAutoComplete SearchText Property
Hi Jen, Thanks for your feedback. Currently you can easily achieve the desired by hooking to the Loaded event handler of the control, get the TextBox there and set the desired MaxLength as shown below: private void OnLoaded(object sender, RoutedEventArgs e) { Dispatcher.BeginInvoke(() => { var textBox = (sender as RadAutoCompleteBox).ChildrenOfType<TextBox>().FirstOrDefault(); if (textBox != null) { textBox.MaxLength = 4; } }); } Regards, Kalin
This control also does not expose the textbox.SelectionStart property. When trying to work around the maxlength issue, it is not possible to reset the cursor position to the end of the input. RadAutoCompleteBox box = sender as RadAutoCompleteBox; box.SearchText = box.SearchText.Substring(0, Math.Min(box.SearchText.Length, 100)); //cursor is now positioned at the front of the input