Version

ToggleButton Property

Determines if the button should keep its state. When true, the button will remain depressed after first being clicked. Clicking the button again will restore the button to its normal state.
Syntax
'Declaration
 
Public Property ToggleButton As Boolean
public bool ToggleButton {get; set;}
Remarks

Setting this to True, will cause the button to be selected on the first click, and the second click will unselect the button. When set to False, a button will only stay selected while the mouse button is pressed down.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, 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

See Also