combobox

What is causing my WPF combobox items to take so long to refresh when the itemssource is changed?

我的未来我决定 提交于 2019-12-23 04:52:45
问题 I have a datagrid (call it dat1) that has an items source bound to an observable collection of a custom type, call it TypeA. One of the properties on TypeA is an observable collection of another custom type, call it TypeB. I then have a combobox with an items source bound to dat1's SelectedItem.TypeB. So when the user selects a TypeA in dat1, the combobox shows the items in the TypeB observable collection from the selected TypeA. Make sense? The binding DOES work and it DOES update. The

Set ComboBox cue banner in Windows XP

不打扰是莪最后的温柔 提交于 2019-12-23 04:52:24
问题 I'm updating a VB.net project that needs to have cue banners added to text boxes and read-only comboboxes (DropDownStyle=DropDownList). The machine I'm developing on is Windows 7. I'm adding the cue text in a class that extends a combobox and adds a cue text property. This is how the cue text is added to the combobox: '"Me" refers to a combobox that has been extended to include a Cue Text property SendMessage(New HandleRef(Me, Me.Handle), CB_SETCUEBANNER, IntPtr.Zero, _cueText) The above code

Binding/Triggering “Select all”-CheckBox ComboBoxItem in WPF

老子叫甜甜 提交于 2019-12-23 04:43:53
问题 I'm trying to make a WPF CustomControl CheckComboBox with a "Select All" item in addition to a user defined list of items. When "Select All" is selected, all items in the list should be checked accordingly. How can I act to the "Select All" item being clicked? I have tried a lot of things, but the property "SelectAll" in the CheckComboBox.cs is never entered. This is my current code. Generic.xaml <Style TargetType="{x:Type local:CheckComboBox}"> <Setter Property="Template"> <Setter.Value>

Friendly-Format Enum for use in ComboBoxes, CheckedListBoxes, etc

为君一笑 提交于 2019-12-23 04:26:08
问题 Requirement I want to select values from an enum in C# using a ComboBox or select bitmasks (for enum s with the Flags attribute) with a CheckedListBox . I want a way to add the values to the controls as selectable items, and cleanly tell which the user has selected. Objective 1: User-friendly I also want the selection to be clear and pretty to the user. Currently I can already add Enum values to a ComboBox or a CheckedListBox , but Enum.ToString() will return the identifier name. Pascal Case

Removing or disable ComboBox item which is selected in another list

邮差的信 提交于 2019-12-23 04:15:28
问题 I have three combo boxes on a WinForm as the following: ___________________________ ComboBox List 1: |_______________________|___| ___________________________ ComboBox List 2: |_______________________|___| ___________________________ ComboBox List 3: |_______________________|___| Each of these combo boxes will have, at design-time, a list of "A", "B", "C". By default, List 1 is the only one active on the form and List 2 and List 3 will become active when its predecessor is given a selection.

WPF Combobox rendering on XP

我与影子孤独终老i 提交于 2019-12-23 03:34:13
问题 I have a problem with a simple combobox rendering on XP. The code is just: <ComboBox Cursor="Hand" customCommands:ComboBoxSelectionChange.Command="{Binding StatusChange}" ItemsSource="{Binding AvailabilityStatusList}"/> However, the result on different OSs is not quite i've expected: Vista: XP: 回答1: You can force a WPF application to apply a certain Windows standard scheme, regardless of the current Windows Version (e.g. XP vs. Vista). To force you application to use the Aero theme (Vista),

Background combobox on gradient parent window?

别说谁变了你拦得住时间么 提交于 2019-12-23 03:27:32
问题 I have window with gradient background. Combobox have own background brush. How can I remove white corner in combobox? How can I change brush or another way. On picture white corner marked by red frame. I create combobox as: DWORD dwStyle = WS_CHILD | CBS_DROPDOWNLIST; if (m_bVisible) dwStyle |= WS_VISIBLE; m_hWnd = CreateWindow(WC_COMBOBOX, NULL, dwStyle, m_posX, m_posY, m_width, m_height, m_hParent, (HMENU)m_id, m_hInstance, NULL); I tried changing background brush with message WM

Two way data Binding issue with combo box - WPF

两盒软妹~` 提交于 2019-12-23 02:58:07
问题 I have a View that contains a Combobox . The Combobox SelectedItem property is data bound to SelectedX property of View Model as two way data binding. When the viewModel is initialized, the SelectedX property is set correctly. But after that when the view renders, it resets the value of SelectedX (since the binding is two-way). So the two way data binding for the Combobox is basically not working. Please advise. This is the xaml for my view. I initialize the View model first with apprpriate

checked list box

自作多情 提交于 2019-12-23 02:41:02
问题 I am new to Access and i am in the process of creating a database for some of our users. I have designed a form where the user name, first and last name etc are inputted. Some of these users work for more than one department which means I need some type of listbox control that allows them to select more than one department when they enter their contact info. In VB Studios 2005, this control is called a CHECKED LISTBOX. I have looked everywhere in access but cant seem to find it or anything

WPF/XAML Binding: Work with real DataContext

回眸只為那壹抹淺笑 提交于 2019-12-23 02:34:57
问题 This is my XAML code: <ComboBox Grid.Row="0" Margin="5" ItemsSource="{Binding Path=Clvm.Categories}"> </ComboBox> <GridSplitter Grid.Row="0" Height="3" /> <DataGrid Grid.Row="1" AutoGenerateColumns="False" ItemsSource="{Binding Alvm.Artists}"> <DataGrid.Columns> <DataGridTextColumn Header="ID" IsReadOnly="True" Binding="{Binding Id}" /> <DataGridTextColumn Header="Name" Binding="{Binding Name}" /> <DataGridTextColumn Header="Email" Binding="{Binding Email}" /> <DataGridComboBoxColumn Header=