0
I have some comboxboxes I fill with checkboxes. After selecting the items click on search, but the first click is used to compress the combo and then click again to trigger the button.
Is there any way to avoid having to double-click a button after opening a combobox? Make the first click compress the combo and press the button.
As it is: I click on the combobox, select the items, click off the combo, click on the button. (Obs. even clicking on the button, the first click is always to compress the combo).
As it would be: I click on the combobox, select the items, click on the button.
<ComboBox
Grid.Column="3"
Grid.Row="1"
x:Name="cmbGrupo"
IsEditable="True"
IsReadOnly="False"
Width="120"
SelectedIndex="0"
>
<ComboBox.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="DarkGray"/>
</ComboBox.Resources>
<ComboBox.ItemTemplate>
<DataTemplate>
<CheckBox
x:Name="chkGrupo"
Content="{Binding Content}"
IsChecked="{Binding IsChecked}"
IsEnabled="{Binding IsEnabled}"
Checked="chk_Changed"
Unchecked="chk_Changed"
/>
</DataTemplate>
</ComboBox.ItemTemplate>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel/>
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
<Button
x:Name="btnPesquisar"
Content="Pesquisar"
Grid.Column="17"
Grid.Row="1"
Width="130"
Click="btnPesquisar_Click"
/>
No code makes it hard to help you. Add combobox and button code.
– StanleyIPC
Done @Stanleyipc
– Denis