New to Telerik UI for WinForms? Download free 30-day trial

Button Items

RadDesktopAlert supports adding custom items to the pop up by using the ButtonItems collection. The following example demonstrates how to add a label, a spin editor and a button element at the bottom of the alert:

Figure 1: RadDesktopAlert's button items

WinForms RadDesktopAlert Button Items

Adding elements to the ButtonItems collection

public void AddButtonItems()
    RadLabelElement labelElement = new RadLabelElement();
    labelElement.Text = "Recipients count: ";
    labelElement.Padding = new System.Windows.Forms.Padding(0, 5, 0, 0);
    RadButtonElement buttonElement = new RadButtonElement();
    buttonElement.Text = "Send";
    buttonElement.Click += ButtonElement_Click;
    RadSpinEditorElement spinElement = new RadSpinEditorElement();
    spinElement.MinSize = new Size(50, 20);

private void ButtonElement_Click(object sender, EventArgs e)

Public Sub AddButtonItems()
    Dim labelElement As New RadLabelElement()
    labelElement.Text = "Recipients count: "
    labelElement.Padding = New System.Windows.Forms.Padding(0, 5, 0, 0)
    Dim buttonElement As New RadButtonElement()
    buttonElement.Text = "Send"
    AddHandler buttonElement.Click, AddressOf ButtonElement_Click
    Dim spinElement As New RadSpinEditorElement()
    spinElement.MinSize = New Size(50, 20)
End Sub
Private Sub ButtonElement_Click(sender As Object, e As EventArgs)
End Sub

In this article