autocompletemode equivalent in system.windows.controls.combobox - wpf

I have an editable combo-box where the user could select (or type) one of the values from the drop-down, or a different value altogether.
I need the autocomplete functionality, which is essentially showing a subset of values in the drop-down when one or more characters are entered.
I see there is an autocompletemode property in system.windows.forms.combobox, which would have probably served my purpose but, is there an equivalent in WPF system.windows.controls.combobox?

The WPF Toolkit Autocomplete Box is what you need. This tutorial should get you started.

Related

How to display partially selected list items in UI5?

Is there a way that I could partially select a list item with sap.m.ListBase mode set as MultiSelect?
Something like this for some of the entries in the list:
https://sdk.openui5.org/entity/sap.m.CheckBox/sample/sap.m.sample.CheckBoxTriState
In the official UI5 API reference for sap.m.Checkbox, there's the property partiallySelected. But for the sap.m.ListBase, I couldn't find anything.
To anyone who faces this problem, I found a solution,
So earlier I was relying on the checkboxes provided by the list's MultiSelect mode and then displaying the items as StandardListItem but I later replaced it with CustomListItem and in it, added my own checkboxes, in which I could set the partially selected property.
I hope this helps :)
I don't think the tri-state makes much sense in combination of sap.m.ListBase and mode="MultiSelect". According to the SAP Fiori Design Guideline checkbox sections regarding "Tri-State":
Usage
[...]
You want to group multiple suboptions under a parent option, and require an intermediate selection state (tri-state). The tri-state indicates that some (but not all) suboptions are selected.
[...]
The main purpose of this state is to represent the mixed selection states of dependent input fields. If some (but not all) of the dependent fields are selected, the checkbox shows a partially selected state. This is only a visual state and can’t be achieved by a direct user interaction.
Unless the list control is of type sap.m.Tree, displaying tri-state checkboxes in sap.m.ListItemBase without any suboptions deviates from common UX patterns and thus might be confusing for end users. I'd suggest reviewing SAP Fiori Design Guidelines (or other design guidelines in case of freestyle) and re-evaluating whether checkbox is really the correct UI element for the intended interaction design.

Showing long strings in wxpython Combobox dropdown

In a wxpython Combobox, long strings get left-truncated in the dropdown portion. This can result in some values looking identical when they aren't. I'd like to provide better information to the user than that.
The following options occur to me:
Insert elipses in the middle of the string before adding it to the combobox's dropdown choices and expanding it back before placing back in the edit portion.
Show a tooltip of the full string when the user mouses/hovers over a value in the dropdown.
Problem is, the Combobox class does not expose events that enable either of the above.
How can I intercept the events corresponding to either of the above? Any other ideas for making long combobox strings visible to the user?
Thanks,
RichK
I would recommend using the ComboCtrl instead of the ComboBox. The benefit is that the ComboCtrl is a custom widget, so it allows more flexibility. For example, the ComboCtrl provides a scrollbar for long strings. Check out the wxPython demo for some good examples.

WPF Toolkit Propertybox does not display nullable Enums

I'm currently using the Extended WPF Toolkit and from that i'm using the Propertybox. This box displays all properties of a bound element. While this works great, there is one problem. I'm using Nullable... so it does not display this enum correctly (it just gives a textbox). If i changed the enum to a normal enum (not nullable), then it displays the items correctly in a combobox.
To solve this, i tried the IItemsSource interface as described in the documentation, but this won't allow me to add a "null" value either.
I know i could solve this by adding a fake "null" value to my enumlist, but i would like to avoid this. Does anyone here know how i could make my nullable display correctly?
Kind regards
Tom
Control documentation:
https://wpftoolkit.codeplex.com/wikipage?title=PropertyGrid
UPDATE SOLUTION:
I "solved" it by using a different control. http://www.codeproject.com/Articles/87715/Native-WPF-4-PropertyGrid. This grid supports it out of the box.
SOLUTION: I "solved" it by using a different control. https://github.com/xceedsoftware/wpftoolkit. This grid supports Nullable out of the box, and has some filtering functions for the properties you want to display that are not included in the Community Edition of the WPF Toolkit.
Update 2020: Added link to current webpage.

Suggest combobox in Outlook 2007 add-in

I have an msoControlComboBox item in an Outlook 2007 command bar. I am able to add items to the combo box dropdown, and if the user types something in the textbox that matches the beginning of any words in the dropdown, then the combobox suggests the rest of the word, inside the text box.
I would like to do a little better than that.
I would like to be able to detect keypress events, and add/remove items from the dropdown list based on the characters the user has entered so far.
I would also like to be able to dropdown the list programatically (right now the only to drop it down appears for the user to click on the dropdown arrow).
Is there a way to accomplish these two objectives (in c#).
There is no out of the box microsoft control that can do it.
You aren't the first person to want this however and I personally used a control found here and found it to be a good starting point for my needs. It's aimed at finding in email addresses but it can be adapted to other needs. It uses regexp searches to find matches

WPF Combobox with auto-complete/auto-filter?

I am eager to find some solid (free, Open Source, or tutorial/example) code to make a WPF Combobox do autocomlete/autofilter as the user types. But everything I've tried so far has had some sort of problem...
A Reusable WPF Autocomplete TextBox came close, but I can't get it to work with more than one filter (more info here).
WPF autocomplete textbox/combobox doesn't work for me because it inherits from UserControl, and thus doesn't support the DataTemplates I need (for showing/selecting the value of one property for an object with multiple properties).
Automatically Filtering a ComboBox in WPF didn't work because it doesn't seem to ever find the EditableTextBox portion of the inherited ComboBox code (via (TextBox)base.GetTemplateChild("PART_EditableTextBox") which seems to always returns null).
Building a Filtered ComboBox for WPF just gets stuck in a refresh loop then overflows the stack after I type just a few letters.
Other things I've considered:
I know that Windows Forms' Combobox control has AutoCompleteMode and I could embed it in WPF, but I can't imagine it would play very well with my WPF data bindings.
Perhaps it is too complex and I need to simplify, maybe by building one-dimensional (single-property) ObservableCollections for the ComboBoxen... However, the challenge of applying multiple filters (one set by another control's value, and one from what the user is typing) to multiple controls using different views of the same DataSet would require a ridiculous amount of processing power to destroy and rebuild the list every time the user types a character!
So... I'm at wit's end. Any suggestions?
If your Combobox has some data source attached to it ,
just make
1-IsTextSearchEnabled = true.
2-IsEditable = true.
you are good to go
Try this one:
http://blogs.windowsclient.net/dragonz/archive/2010/02/23/autocomplete-textbox-control-for-wpf.aspx

Resources