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

Dialog Icons

RadTaskDialog shows a large icon in the header layout that signifies the purpose of the dialog. The RadTaskDialogPage.Icon property allows you to specify the RadTaskDialogIcon itself.

Specifying the dialog icon

RadTaskDialogPage page = new RadTaskDialogPage();
page.Caption = "Window Title";
page.Heading = "Main instruction";
page.Text = "Main text here...";
page.Icon = RadTaskDialogIcon.Information;
RadTaskDialog.Show(page);

Dim page As RadTaskDialogPage = New RadTaskDialogPage()
page.Caption = "Window Title"
page.Heading = "Main instruction"
page.Text = "Main text here..."
page.Icon = RadTaskDialogIcon.Information
RadTaskDialog.Show(page)

You can find listed below the available built-in icons:

  • RadTaskDialogIcon.None - no icon is displayed

winforms/task-dialog-icons 001

  • RadTaskDialogIcon.Information

winforms/task-dialog-icons 002

  • RadTaskDialogIcon.Warning

winforms/task-dialog-icons 003

  • RadTaskDialogIcon.Error

winforms/task-dialog-icons 004

  • RadTaskDialogIcon.Shield

winforms/task-dialog-icons 005

  • RadTaskDialogIcon.ShieldBlueBar

winforms/task-dialog-icons 006

  • RadTaskDialogIcon.ShieldGrayBar

winforms/task-dialog-icons 007

  • RadTaskDialogIcon.ShieldWarningYellowBar

winforms/task-dialog-icons 008

  • RadTaskDialogIcon.ShieldErrorRedBar

winforms/task-dialog-icons 009

  • RadTaskDialogIcon.ShieldSuccessGreenBar

winforms/task-dialog-icons 010

The RadTaskDialogPage.Icon.SvgImage property allows you to specify the vector image to the task dialog. The RadTaskDialogIcon.GetSvgImage(RadTaskDialogIconImage icon, Size? size = null) method offers an easy way of creating a SvgImage passing the RadTaskDialogIconImage and size as arguments.

Custom Icon

If none of the built-in icons fits your needs, it is possible to construct your own RadTaskDialogIcon:

winforms/task-dialog-icons 011

RadTaskDialogPage page = new RadTaskDialogPage();
page.Caption = "Window Title";
page.Heading = "Main instruction";
page.Text = "Main text here...";
page.Icon = new RadTaskDialogIcon(new Bitmap(Properties.Resources.TV_car,new Size(64,64)));
RadTaskDialog.Show(page);

Dim page As RadTaskDialogPage = New RadTaskDialogPage()
page.Caption = "Window Title"
page.Heading = "Main instruction"
page.Text = "Main text here..."
page.Icon = New RadTaskDialogIcon(New Bitmap(My.Resources.TV_car1, New Size(64, 64)))
RadTaskDialog.Show(page)

See Also

In this article
Not finding the help you need? Improve this article