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
Related
I Have a WPF listbox and are using the GongSolutions.Wpf.DragDrop so the drag drop can be handled in the bound ViewModel.
My listbox is using an ItemTemplate, where each item is a UserControl that is basically just a panel with a TextBox.
When I try and select text within the text box, a drag operation starts. I would like to disable this drag operation just for this TextBox.
Would anyone know how to do this, and if particular when using the GongSolutions.Wpf.DragDrop library?
Thanks in advance
As it turns out, upgrading to the latest version fixed this.
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.
I'm using a modified form of treeview, for the treeviewitem there is a template to show a textbox with a done button in a popup. I have used a static class to find if the mouseOver
(IInputElement currentPosition = Mouse.DirectlyOver;) event on any of the other treeview item to highlight them other than the one in Popup textbox. Items are added dynamically to this treeview. I'm using MVVM model here.
The problem is that when the first item is added and is in Popup textbox , the mouseover for the entire application is somehow turned off, which is not required. But on adding the second item and leaving it in the Popup textbox, the mouseover is switched on, i.e the treeviewitems get highlighted when mouseover occurs. this happens alternately....
What is capturing this mouseover event..??
try using snoop it can tell you what events are being raised, handled. and its a cool tool as well for the wpf man (or woman:)
I have a button with a transparent background on a wpf window.
Problem is, when I open up another window with a .showdialog the form becomes disabled as does the button, causing the button to go white (and stick out like a sore thumb); the same happens to the listview and textbox controls. Labels and group boxes aren't impacted in this way and remain looking fine.
How do I preserve the transparency color of the button, listview and textboxes when they are disabled?
Thanks, Rob
I'm not sure what your button template looks like, I would recommend posting your XAML. But check out the MSDN Docs on Button Templating