# Button

The **RadButton** control inherits from the **Button** control and implements the **ICommandSource** interface. Because of the inheritance it has all of the features that the standard **Button** control has. Moreover, the **ICommandSource** implementation allows you to attach commands to the button, which will get executed when it gets clicked.

To learn more about the members of the **RadButton** class, you can read [here](http://www.telerik.com/help/wpf/allmembers_t_telerik_windows_controls_radbutton.html).

To learn how to use it with commands you should read the [Commands](https://www.telerik.com/products/wpf/documentation/controls/radbuttons/commands) topic.

## Instantiating RadButton

You can instantiate your **RadButton** in both XAML and code. Here is an example:

> The **RadButton** control is located in the **Telerik.Windows.Controls.dll** and in order to use it in your project you have to add a reference to the assembly.  You can find more info [here](http://www.telerik.com/help/wpf/installation-installing-controls-dependencies-wpf.html). <br/> Then in XAML you have to declare the namespace: `xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"`

**Example 1: Defining a button in XAML**

```XAML
<telerik:RadButton Content="Click Me!" />
```

**Example 2: Defining a button in code**

```C#
RadButton radButton = new RadButton() { Content = "Click Me!" };
```

```VB.NET
Dim radButton As New RadButton() With { _
    .Content = "Click Me!" _
}
```

> caption The created button

![The created button](https://www.telerik.com/products/wpf/documentation/assets/ea1fffe50fa194666332d910b911b36a/radbuttons-features-button-0.png)

## Handling the Button Click

If you want to implement custom logic to be executed when the button is clicked, you can either:

* handle the **Click** event.

or

* use **Commands**.

> tip You can see how to use commands in the [Commands](https://www.telerik.com/products/wpf/documentation/controls/radbuttons/commands) article.

Here is an example of handling the **Click** event of a button.

**Example 3: Subscribing to the Click event**

```XAML
<telerik:RadButton Content="Click Me!" Click="RadButton_Click" />
```

**Example 4: Defining a Click event handler**

```C#
private void RadButton_Click(object sender, RoutedEventArgs e)
{
    //implement your logic here
}
```

```VB.NET
Private Sub RadButton_Click(sender As Object, e As RoutedEventArgs)
    'implement your logic here'
End Sub
```

## Customizing the RadButton

* **IsBackgroundVisible** - this property is of type bool and it controls the visibility of the background and the border of the **RadButton** control in normal state

  > caption A button with a hidden background

  ![A button with a hidden background](https://www.telerik.com/products/wpf/documentation/assets/1f155230f63eb207e251fe0d52a2527b/radbuttons-features-button-1.png)

* **CornerRadius** - this property is of type **CornerRadius** and it controls the **CornerRadius** of the **RadButton** control

  > caption A button with its CornerRadius set to 15

  ![A button with its CornerRadius set to 15](https://www.telerik.com/products/wpf/documentation/assets/40675ec95ea7216397ae5d7a5441ab3a/radbuttons-features-button-2.png)

## See Also

* [DropDown Button](https://www.telerik.com/products/wpf/documentation/controls/radbuttons/features/dropdown-button)
* [Commands](https://www.telerik.com/products/wpf/documentation/controls/radbuttons/commands)
* [Toggle Button](https://www.telerik.com/products/wpf/documentation/controls/radbuttons/features/toggle-button)
