I try to activate a combobox control from a textbox control in c#. I want to select combobox items by using arrow keys, but they are only selectable by mouse.
Any help? Thanks.
Related
In WPF, is there any way to Scroll Up and Down using Keyboard arrow in ComboBox list items?
I'm new in wpf, want to develop app in c#, where combobox will have 3 subitem(i.e audi, bmw and custom) selecting custom will again show the combobox will have 2 radio buttons, and one combobox in it.
So combobox will have item and some item again will have subitem. This is similar to menu and some menu item has again submenu, e.g CAR combobox will have 3 combo item i.e. audi,bmw and customise car. Selecting customize car will show popup, having 2radio btn and one combobox. so user can select either audi, bmw or customize car option
I'm assuming that the options of the main ComboBox are in some way hard-coded. Whether that's in xaml or in code. Either way I would define a method for the SelectionChanged event on the combo box and open a new window, when Custom is selected.
<ComboBox Name="..." ..., SelectionChanged="carType_SelectionChanged" />
Defining this here in the xaml will automatically generate the carType_SelectionChanged method in the code for this window. If it doesn't it will look something like this:
carType_SelectionChanged(object sender, SelectionChangedEventArgs e)
This popup window can be another wpf window that is called by the main. This can contain two radio buttons and a ComboBox populated in the same way that the main window's combobox is. My understanding of what you want from this popup window is that the ComboBox displays the same information. However for this I wouldn't have the check on the custom option to open a popup, as this has already occurred at this point.
If you need help calling the new window inside the SelectionChanged method, let me know and I can point you in the right direction for doing that.
I want to modify silverlight combobox behavior. I want to open dropdown by mouse entering to combobox but not clicking, that iseasy to do when handling MouseEnter event and seting IsDropDownOpen property to true. But the issue is how to close dropdown when mouse leaves dropdown area and combo itself. Any suggestions.
Thanks.
My suggestion is that you use Expander from Silverlight Toolkit with ItemsControl
Video: http://www.silverlight.net/learn/creating-ui/control-basics/silverlight-toolkit-creating-a-toolkit-expander
I'm trying to create a button in main window that would look like a globe, which would allow user to select his/her location. I want it to display a listBox when clicked on it just below the button itself.
Any hints on how to do this?
Probably the simplest way to do this is restyle a ComboBox and then restyle the ToggleButton in the ComboBox and remove the editable textbox.
This will avoid you having the implement the functions of the ComboBox for your popup.
Try using this as a starting point.
Another Approach would be to use the Expander Control with a list box in it
Link
OR
You could play with the Listbox's visibility property
I have a ComboBox with a DataTemplate. The DataTemplate has two controls, each of which has a ToolTip attached to it. The list of items of the ComboBox has the tooltips as expected when you hover over each control. But the selected item area on top of the ComboBox does not display the tooltips, though the controls are rendered as expected. Is there a way to force the tooltips to be displayed?
If you're using Mole or something similar, make sure that your control with the attached ToolTIp has IsHitTestVisible="True". Otherwise, the control is not listening for mouse events and will not recognize that the ToolTip should be shown in the first place.
You may also want to look at binding the ToolTip of the selected item to the ContentPresenter in the ComboBox since, after selection, your SelectedItem becomes the content of the ComboBox. You may need to override the ComboBox template and make sure the ContentPresenter can accept mouse input in order to force your ToolTip's visibility.