假设我们有以下 XAML:
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="_Test" Margin="12" Width="200" Height="30" Click="OnClick" />
<ComboBox Margin="12" Width="200" Height="30" >
<ComboBox.Items>
<ComboBoxItem>First</ComboBoxItem>
<ComboBoxItem>Second</ComboBoxItem>
<ComboBoxItem>Third</ComboBoxItem>
</ComboBox.Items>
</ComboBox>
</StackPanel>
Alt+T 快捷键将按下按钮。如何使 Alt+R 快捷键打开组合框下拉菜单?
更新:顺便说一句,我知道标签的目标属性,我知道我可以创建 KeyBinding(或类似的东西)并处理例如 Ctrl+R,但我正在寻找更简单的方法。