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 RadTaskDialog None

  • RadTaskDialogIcon.Information

WinForms RadTaskDialog Information

  • RadTaskDialogIcon.Warning

WinForms RadTaskDialog Warning

  • RadTaskDialogIcon.Error

WinForms RadTaskDialog Error

  • RadTaskDialogIcon.Shield

WinForms RadTaskDialog Shield

  • RadTaskDialogIcon.ShieldBlueBar

WinForms RadTaskDialog ShieldBlueBar

  • RadTaskDialogIcon.ShieldGrayBar

WinForms RadTaskDialog ShieldGrayBar

  • RadTaskDialogIcon.ShieldWarningYellowBar

WinForms RadTaskDialog ShieldWarningYellowBar

  • RadTaskDialogIcon.ShieldErrorRedBar

WinForms RadTaskDialog ShieldErrorRedBar

  • RadTaskDialogIcon.ShieldSuccessGreenBar

WinForms RadTaskDialog ShieldSuccessGreenBar

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 RadTaskDialog Custom Icon

             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