Difference between SelectedItem, SelectedValue and SelectedValuePath

Their names can be a bit confusing :). Here’s a summary: The SelectedItem property returns the entire object that your list is bound to. So say you’ve bound a list to a collection of Category objects (with each Category object having Name and ID properties). eg. ObservableCollection<Category>. The SelectedItem property will return you the currently … Read more

How can I find WPF controls by name or type?

I combined the template format used by John Myczek and Tri Q’s algorithm above to create a findChild Algorithm that can be used on any parent. Keep in mind that recursively searching a tree downwards could be a lengthy process. I’ve only spot-checked this on a WPF application, please comment on any errors you might … Read more

ComboBox Dropdown when Mouse Enter WPF

In WPF, setting IsDropDownOpen property can do it xaml: <ComboBox Name=”cb” IsEditable=”True” MouseEnter=”Cb_OnMouseEnter”/> code: private void Cb_OnMouseEnter(object sender, MouseEventArgs e) { cb.IsDropDownOpen = true; } – In winform there is DroppedDown property to set. cbo.DroppedDown = true; by this link: How to make combo box auto expand on mouse hover and close when the mouse … Read more