Button::IsDefaulted Property
Gets a value that indicates whether a Button is the button that is activated when a user presses ENTER.
Assembly: PresentationFramework (in PresentationFramework.dll)
Property Value
Type: System::Booleantrue if the button is activated when the user presses ENTER; otherwise, false. The default is false.
The IsDefaulted property is true when the IsDefault property is set to true and the control that has focus does not accept ENTER as input. For example, in the Run dialog box, the OK button is the default button. When focus is on the text box, IsDefaulted on the OK button is true because a user can activate the button by pressing ENTER.
Note |
|---|
If the default button has focus, IsDefaulted is false. This is because the OnKeyDown method handles ENTER, and it is not necessary for IsDefaulted to be set to true. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note