Hi How do i select the checkbox using keyboard.
Regards,
Rajiv
Hi Rajiv,
Since you did not specify which XamComboEditor you are using, I attached a sample that demonstrates how to implement space bar selection for both the WPF only XamComboEditor and the shared version.
The sample handles the PreviewKeyDown event on both the editors and it detects when an item is highlighted and the space bar is pressed so that it can select it.
Let me know if you have any questions on this.
Hi Rob,
I am using shared combo editor, I have used the same code for selection, and written some code for deselection of item with space. Selecting is working fine, where as deselection isn't, it deselectes 2-3 values.
Here is my code snippet
if (e.Key == Key.Space) { XamComboEditor xamCombo = (XamComboEditor)sender; foreach (ComboEditorItem item in xamCombo.Items) { if (item.IsFocused) { if (item.IsSelected) { item.IsSelected = false; e.Handled = true; } else { item.IsSelected = true; e.Handled = true; } } } }
Can you check.
rajiv