WPF_button 接受回车事件

我们可以在XAML中添加一条isdefalut属性为ture即可实现

<Button x:Name="btn_login" Content="登陆" HorizontalAlignment="Left" Margin="115,0,0,35" Grid.Row="1" VerticalAlignment="Bottom" Width="75" Background="#FFB46868" Click="btn_login_Click" IsDefault="True"/>

文章来自:http://www.cnblogs.com/linbinqiang/p/4620508.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3