Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Analogue of AcceptButton property in WPF window class?

The Form class of windows forms has the AcceptButton property, which allows certain button to be clicked when a user press Enter. Does the Window class of WPF has similar feature?

like image 454
Louis Rhys Avatar asked Feb 02 '12 08:02

Louis Rhys


1 Answers

It's the IsDefault property on the Button:

<Button IsDefault="true">OK</Button>
like image 52
Botz3000 Avatar answered Oct 31 '22 09:10

Botz3000