首页 > 其他分享 >TextBox.InputBindings 绑定按键事件

TextBox.InputBindings 绑定按键事件

时间:2022-12-29 14:11:07浏览次数:51  
标签:InputBindings 事件 绑定 按键 TextBox

 <TextBox Text="{Binding Search, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                             VerticalAlignment="Center" Width="250" md:HintAssist.Hint="查找待办事项"
                             md:TextFieldAssist.HasClearButton="True">
                        <TextBox.InputBindings>
                            <KeyBinding Key="Enter" Command="{Binding ExecuteCommand}" CommandParameter="查询" />
                        </TextBox.InputBindings>
                    </TextBox>

  

标签:InputBindings,事件,绑定,按键,TextBox
From: https://www.cnblogs.com/friend/p/17012381.html

相关文章