How can I allow the users of my program to type in a value and have it auto-complete, however, I also what to prevent them from entering new data because it would cause the data to be unfindable (unless you had direct access to the database).
Does anyone know how to do this?
The reasoning behind not using just a dropdown style combobox...
What is the most efficient to fill a ComboBox with all the registered file types in Windows?
I want the full file type, not just the extension. I'm using VB 9 (VS2008).
Thank you.
...
I have a custom class Contact.
I am trying to bind a List<Contact> to a ComboBox.
But I can't get the right syntax/commands for the Windows.Resources part, e.g. the code below gives the error "The type reference cannot find a public type named 'List'", what do I need to fix in Windows.Resources to get this to work?
My XAML:
...
I am having virtually the same problem as this:
http://stackoverflow.com/questions/433281/c-update-combobox-bound-to-generic-list
However, I am trying to change the displayed strings; not add, remove, or sort. I have tried the BindingList solution provided in the referenced question, but it has not helped.
I can see the combobox's Dat...
I have a DataTemplate giving items for display in both a ListBox and a ComboBox. The window I have created looks like this:
The question I have is why the DataTemplate in the ComboBox is blurrier or slightly more pixellated than the display in the ListBox. It is quite difficult to see on the screenshot, but it seems more noticeable whe...
Is there an ItemActivated event (like in Windows Forms) in the WPF ListBox or ComboBox controls? I can't see one.
It seems crazy for there not to be some event doing the same kind of thing - so does it just go by another name? If not, is there another easy way to do it? I've seen various blog posts about this but they all seem to involv...
I'm trying to implement behaviour similar to the Firefox 3 AwesomeBar in WPF. I've got a ComboBox to use a DataTemplate that makes the dropdown look like the dropdown for the AwesomeBar, but I'm not sure how to get the right behaviour.
What I want to happen is for the user to type their search into the TextBox bit of the ComboBox and th...
I can't seem to get my ComboBox to refresh after i add new data to the Access Database.
Here's the Code i use to add the new data:
private void btnAddUser_Click(object sender, EventArgs e)
{
AccountForm actFrm = new AccountForm();
if (actFrm.ShowDialog() == DialogResult.OK)
{
try
{
...
I have a combobox in C# and I want to use auto complete suggestions with it, however I want to be able to change the auto complete entries as the user types, because the possible valid entries are far too numerous to populate the AutoCompleteStringCollection at startup.
As an example, suppose I'm letting the user type in a name. I have...
In WPF, it seems to be impossible to select (with the mouse) a "null" value from a ComboBox. Edit To clarify, this is .NET 3.5 SP1.
Here's some code to show what I mean. First, the C# declarations:
public class Foo
{
public Bar Bar { get; set; }
}
public class Bar
{
public string Name { get; set; }
}
Next, my Window1 XAML:
...
I have a ComboBox in WPF which is databound, and has data template which controls how each of the items is displayed. I have made it so that each item is displayed with two bits of text (for the Name and Path properties) and one image (for the Icon property).
At the moment when I select an item from the ComboBox the textbox bit of the C...
I have a ListBox on a form that is bound to an ObservableCollection of a custom type. Within each item there is a ComboBox bound to an enumeration type. When the window loads, all ComboBoxes are defaulted to a certain value. When I change the SelectedItem for any one (from the UI, not from code), all other ComboBoxes change to the sam...
I've got a ComboBox in WPF that I've mucked around with quite a lot (it has a custom template and a custom item template). I've got it to the point now where it is working pretty much how I want it, except that when I type into the ComboBox it is doing the filtering for me, but only filters assuming what I type starts the name of the ite...
I want to use a ComboBox with the DropDownList style (the one that makes it look like a button so you can't enter a value) to insert a value into a text box. I want the combobox to have a text label called 'Wildcards' and as I select a wildcard from the list the selected value is inserted in to a text box and the combobox text remains 'W...
I am developing a program which gets all Clearcase regions (basically strings) & adds them to Combo box. I compare an existing clearcase region string in newly added items in combo box & if it is found then I want to select it, but because nothing is selected for the first time, selectedItem is null & selectedIndex = -1.
when I assign 0...
In C# 3.5 using a ComboBox to display the results of a LinQ Query. How do I set the selecteditem property of the combobox when the LinQ query is returning an anonymous type?
I set the datasource of the combobox along these lines:
comboBox1.DataSource = from p in db.products
select p;
comboBox1.DisplayMember = "Name";...
Since there is no pre-existing component for creating a combobox (or select box) as seen on webpages through Safari, can someone provide an example or pre-existing 3rd party component of creating one?
...
I have a Combobox control on my form (WinForms, .NET 3.5), and its DropDownStyle property is set to Simple. Let's say it is populated with the letters of the alphabet, as string objects ("a", "b", "c", and so on).
As I type a letter in the combobox' input field, the correct item will be displayed just underneath.
This is the behaviour I...
Why i cant set selecteditem property programatically?
Im calling it from another XAML Window, that hace certaing controls , one of them is a ComboBox i was trying this :
string tm = (from ea in db.EXAMENXATENCIONs where ea.codigo == Convert.ToInt32(numeroinforme) select ea.turnomedico).FirstOrDefault();
demo.cb...
The title pretty much stays it all. Say I have an enum with four values:
public enum CompassHeading
{
North,
South,
East,
West
}
What XAML would be required to have a ComboBox be populated with these items?
<ComboBox ItemsSource="{Binding WhatGoesHere???}" />
Ideally I wouldn't have to set up C# code for this.
Tha...