How to set the themeColor for the WindowService?

1 Answer 73 Views
Dialog Window
Dustin
Top achievements
Rank 1
Dustin asked on 26 Jul 2023, 10:36 PM

I have an app that is launching a window via the WindowService open method and I want to set the "themeColor" for the window.  There is no themeColor property available in the WindowsSettings.  I did try setting it via htmlAttributes, but that didn't have any effect. 

Am I just missing something?

 


    const windowRef = this.windowService.open({
      title: appointment.event?.name, 
      content: AppointmentModalViewComponent,
      width: 500,
      minWidth: 450,
      htmlAttributes: {
        "themeColor": "primary"
      }
    });

1 Answer, 1 is accepted

Sort by
0
Tsvetelina
Telerik team
answered on 28 Jul 2023, 11:56 AM

Hi Dustin,

Thank you for the provided details. 

I can confirm that the WindowSettings doesn't provide a themeColor property like the WindowComponent.

Such a property would be a good addition to the WindowSettings API and that is why I opened a feature request in our Feedback Portal so that other clients can vote for it. I have also added a vote on your behalf in order to increase the priority of this feature:

https://feedback.telerik.com/kendo-angular-ui/1617930-dialogs-add-themecolor-property-to-the-windowsettings-and-dialogsettings

That will help us track the demand for such a feature and eventually provide it in a future release of Kendo UI for Angular. 

In the meantime, a possible workaround is to use the cssClass property and add one that matches the desired theme. Here is a Stackblitz demo that demonstrates this approach:

https://stackblitz.com/edit/angular-5ppnfr-z2rdph?file=src%2Fapp%2Fapp.component.ts

The available classes are k-window-primary, k-window-dark, and k-window-light.

I hope the provided information helps. Please feel free to write back.

Regards,
Tsvetelina
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Dialog Window
Asked by
Dustin
Top achievements
Rank 1
Answers by
Tsvetelina
Telerik team
Share this question
or