The default behavior when the focus is inside an input control and it's Text is changed is that it's caret is placed in the beginning of the next text. This could be observed in the WPF TextBox control. In certain scenarios modifying the SearchText while the focus is inside the control is a desired behavior. In those scenarios the caret position is expected to be set to the end of the new text which is set to the SearchText property.
Please add a simple way to show "Clear all" button in a MultiSelect mode to clear all selected items, so we don't have to customize entire control template. Added properties could be at least those: IsClearAllButtonVisible and ClearAllButtonTemplate.
Best regards,
Vladimir
Hi,
under certain circumstances, RadAutoCompleteBoxes (at least in the "SuggestAppend" mode) have a discrepancy between what is displayed and what is actually selected/in their SearchText property.
Steps to reproduce:
- Execute the attached project
- Focus the AutoCompleteBox on the top left.
- type the number zero (0) (for demo purposes, all items have names that look like 00001, 00002, 00004, ...)
- You should now see the Dropdown opening and the suggestion mechanism beginning to suggest the first item in the list. You should also see that the SearchText property that is bound to ViewModel contains the single zero you just typed. The selected item is still NULL as expected.
- Now, instead of typing anything else, click out of the AutoCompleteBox and focus another control (I added the WatermarkBox on the right side to allow for that)
- This is the point where the discrepancy occurs: The viewmodel still only sees the zero you typed and no item is selected. BUT: the AutoCompleteBox now shows the full item name as if it was selected correctly, see the attached screenshot.
As a user who does not have the controls on the right side to show me what is actually happening under the hood, I have no chance of knowing what is actually selected (and if anything is selected at all). To me it looks like the AutoCompleteBox just selected the first item for me. If this is what I wanted, I would have no reason to think that nothing is actually selected.
Since the ViewModel does not know anything about the additional text that is displayed, I (now as the programmer) have afaik no chance to add a workaround that selects the corresponding item when the control loses focus.
What I think it should look like:
There are two possibilities:
1. As soon as the control loses focus, the suggestion should disappear, leaving me with a single zero in the text box and nothing selected.
2. There could be a second property where I can bind to the full text in the textbox (including the suggestion) so I as the programmer can decide what to do with the suggestion once the control loses focus.
Best regards
Simon Müller
Hofmann Fördertechnik GmbH
PS.: If you click back into the AutoCompleteBox after defocusing it, you can then actually edit the suggestion as if it was text you inserted in the first place. But only after your first key press, the ViewModel is updated to the full string that is displayed in the textbox.
Currently, if you wrap RadAutoCompleteBox in a ScrollViewer (along with some other controls) and enable the vertical scrollbar of the child TextBox control, the scrolling doesn't bubble to the parent ScrollViewer when you reach the beginning (scroll up) or the end (scroll down) of the TextBox scrollbar.
Add an option or change the default behavior and allow the scrolling to bubble to the parent scrollbar. This behavior can be observed in the native TextBox control with an enabled vertical scrollbar.
For the time being, the MouseWheel event can be manually raised:
private void ScrollViewer_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
if (sender is ListBox && !e.Handled)
{
e.Handled = true;
var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta);
eventArg.RoutedEvent = UIElement.MouseWheelEvent;
eventArg.Source = sender;
var parent = ((Control)sender).Parent as UIElement;
parent.RaiseEvent(eventArg);
}
}
Hello,
Did some reading and didn't see a way to do this but I am wondering with the RadAutoCompleteBox is it possible to select multiple suggestions at the same time?
Looking at https://docs.telerik.com/devtools/wpf/controls/radautocompletebox/overview for example the picture shows "United Kingdom" and "United States". Is there a way for the user to select both "United Kingdom" and "United States" either with a checkbox or a shift-click or some other mechanism?
The use case is as follows: the RadAutoCompleteBox is tied to a search algorithm that can be a bit slow at times and will return many records. Would be handy for the user to just click all the suggestions they want instead of researching each time.
Similar to BoxesItemTemplate when SelectionMode=Multiple. Perhaps switch between modes of text entry and SelectedItemTemplate. This would allow a custom display of the selected item and the ability to re-enter search by text mode. It might be nice if the type search text stayed so if you mis select- simply clicking the search text would get the user back to the same filtered list pre-mis-select.
Steps to reproduce: 1. Run the attached sample application 2. Enter the value that is not on the list of autocomplete values. 3. The RadAutoCompleteBoxAutomationPeer.Value return null, because the value is not included in SelectedItems collection If the entered value is included in the list, the RadAutoCompleteBoxAutomationPeer.Value contains a comma (',') in single selection mode. Workaround: 1. The first approach is getting the value from nested watermark text box 2. Another approach is creating own AutomatomationPeer that getting the value from SearchText
The current workaround is to directly set the value of the underlying TextBox instead: this.RadAutoCompleteBox.ChildrenOfType<TextBox>().First().Text = "1 I";
When you start typing, the dropdown appears and then you leave the AutoCompleteBox without clicking, the cursor is not changing back to arrow. As a workaround of the issue you could manually release the mouse capture in the Populated event handler of the control as shown below: private void AutoCompleteBox_Populated(object sender, System.EventArgs e) { if (Mouse.Captured is RadAutoCompleteBox) { (sender as RadAutoCompleteBox).ReleaseMouseCapture(); } }
In Multiple SelectionMode it would be useful to be able to customize the way selected items (boxes) are displayed. Customizing their looks via a StyleSelector would be optimal.
Make it possible to customize the built-in AsyncFilteringBehavior by inheriting it or it's interface
e.g. AutoCompleteBox is in SelectionMode="Single" has 3 items - "Item 1", "Item 2", "Item 3"When the user enters "Item 1" with keyboard, the control should select this item.
When I type some characters, an item is always selected (generally the first if we don't create an highlightbehavior), but when I delete a character, no item is selected even if the list contains items. It would be awesome if the behavior of a character removing can be the same than the behavior of the character typing. So I would like, after a charater removing, that an item is always selected when the filtered list contains at least one element. Thanks for this feature!
Add a possibility to set minimum populate delay to the control. It would be useful if a property like MinimumPopulateDelay is available to be set which would cause the populating of items to be delayed. Such feature would be helpful for cases when making requests to web server etc.