[Solved] Combobox show and hide ComboBox items in WPF

Create a custom control such as: public class CrazyCombo : ComboBox { static CrazyCombo() { DefaultStyleKeyProperty.OverrideMetadata(typeof(CrazyCombo), new FrameworkPropertyMetadata(typeof(CrazyCombo))); } public int InitialDisplayItem { get { return (int)GetValue(InitialDisplayItemProperty); } set { SetValue(InitialDisplayItemProperty, value); } } // Using a DependencyProperty as the backing store for InitialDisplayItem. This enables animation, styling, binding, etc… public static readonly DependencyProperty InitialDisplayItemProperty … Read more

[Solved] Two combobox with same ItemsSource of ObservableCollection

ComboBoxItem is a FrameworkElement which cannot belong to multiple parents. When you use string collection, each ComboBox generate a new ComboBoxItem for the same string. When collection contains ComboBoxItems, comboBoxes don’t create other ComboBoxItems and reuse existing, stealing them from each other. Additionally when you follow MVVM approach, you should not have ComboBoxItem objects in … Read more

[Solved] How do I use a combobox and textbox on a userform in VBA to search and find data on the active Excel spreadsheet?

So her is a new Solution. You have to declare 3 Public Variables in the UserForm1 Modul. So you can give them Values while the USerForm is open and Find the Naxt Values when you click multiple Times on the Search Button. ‘Public Variables Public bolFirstSearch As Boolean Public rng As Excel.Range Public cellFound As … Read more

[Solved] Undo comboboxes – in groupbox

Problem solved. When combobox is databinded you have to clear databind, fill dataset again and repeat databind. This solved my problem, but It also all other databinded controls gets undo this way. solved Undo comboboxes – in groupbox

[Solved] How can I use combobox with wpf mvvm

Your code in LocationFilter make no sense at all. ParticularEntries.Select(pg => pg.Region.Location == _selectedLocation); It returns an IEnumerable<bool> but it is never assigned. If you want to filter, you have to use Where. But even if you change your code to ParticularEntries = ParticularEntries.Where(pg => pg.Region.Location == _selectedLocation); you will see a change, but you … Read more