Louis Rhys
Louis Rhys

Reputation: 35637

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?

Upvotes: 8

Views: 2126

Answers (1)

Botz3000
Botz3000

Reputation: 39650

It's the IsDefault property on the Button:

<Button IsDefault="true">OK</Button>

Upvotes: 6

Related Questions