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"/>

posted @ 2015-07-04 12:21  gopher-lin  阅读(825)  评论(0编辑  收藏  举报