Toggle State in WPF Button (ButtonAdv)
4 May 20211 minute to read
The button control can also be used as a toggle button, similar to the on/off view when the IsCheckable property is set to true. The default value of this property is false.
NOTE
In addition to IsCheckable property, the IsChecked property helps to check the button by default. In other words, during initial rendering, the button will appear in on state using the later 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;