Reputation: 201
I want to assign the shortcut to every item in combobox control. Also I want the shortcut "letter" is underlined (for label/textbox pair I would use the _ symbol to achieve the desired effect).
For example, there is a combobox containing names: Alex, John, Sandra. I want press lets say Alt+e for selecting Alex, Alt+o for selecting John and Alt+a for Sandra. Is it doable without creating my own control?
Upvotes: 1
Views: 351
Reputation: 45096
This is the ListBox version.
<ListBox>
<ListBoxItem>
<Button Click="btnAlpha_Click">
<AccessText>_alpha</AccessText>
</Button>
</ListBoxItem>
<ListBoxItem>
<Button Click="btnBravo_Click">
<AccessText>_beta</AccessText>
</Button>
</ListBoxItem>
<ListBoxItem>
<Button Click="btnCharlie_Click">
<AccessText>_charlie</AccessText>
</Button>
</ListBoxItem>
</ListBox>
Upvotes: 1