How can I change BackColor of TaskDialog bar to something custom?

1 Answer 84 Views
Form
Simos Sigma
Top achievements
Rank 2
Iron
Iron
Iron
Simos Sigma asked on 12 Sep 2022, 09:35 AM

Hello community!!!

Is there any way we can change the BackColors of bar behind icon? To something custom.



Thank you for your time!!!

PS: There is no TaskDialog tag into Tags field!!!

1 Answer, 1 is accepted

Sort by
1
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 12 Sep 2022, 10:29 AM

Hello, Simos,

Note that the color depends on the applied icon to the task dialog. Once the RadTaskDialogPage.Icon is specified, it is possible to customize the color by setting the RadTaskDialogPage.HeaderLayout.BackgroundElement.BackColor property: 

            RadTaskDialogPage page = new RadTaskDialogPage();
        
            page.Caption = "Window Title";
            page.Heading = "Main instruction";
            page.Text = "Main text here...";
            page.Icon = RadTaskDialogIcon.ShieldSuccessGreenBar;
            page.Icon.SvgImage = RadTaskDialogIcon.GetSvgImage(RadTaskDialogIconImage.FlatShieldSuccess, new Size(32, 32));

            page.HeaderLayout.BackgroundElement.BackColor = Color.Red; ;
            page.HeaderLayout.BackgroundElement.GradientStyle = GradientStyles.Solid;
            
            RadTaskDialog.ShowDialog(page);

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Simos Sigma
Top achievements
Rank 2
Iron
Iron
Iron
commented on 12 Sep 2022, 11:15 AM

Thank you very much!!!
Tags
Form
Asked by
Simos Sigma
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or