Toggle State in WPF Button (ButtonAdv)
18 Nov 20181 minute to read
The WPF Button control can also be used as a ToggleButton, similar to an on/off switch, when the IsCheckable property is set to true. The WPF Button is implemented through the ButtonAdv class. The default value of this property is false.
In addition to the IsCheckable property, the IsChecked property lets you check the WPF Button by default. During initial rendering, the WPF Button appears in the on state when you use the latter property.
<syncfusion:ButtonAdv Label="Log-in" SmallIcon="image/employee.png" SizeMode="Normal" IsCheckable="True" IsChecked="True"/>ButtonAdv button = new ButtonAdv();
button.Label = "Log-in";
button.SizeMode = SizeMode.Normal;
button.SmallIcon = new BitmapImage(new Uri("employee.png"));
button.IsCheckable = true;
button.IsChecked = true;
Checkable Button control