Is it possible to add the modal feature to the window. This feature is currently only available for Dialog.
Hi @hhiliahh,
The Window is not modal by design. However, you could easily add the modal feature by including a div element with the k-overlay CSS class to the page (the same is used for the Dialog). Here is an example of this in action.
Based on the solution of @Raisolution I built a directive that automatically adds a div.k-overlay to the dom when the kendo-window is rendered.
The source can be found here. (Gist)
In case someone finds it useful, feel free to use it.
Just import the WindowWithBackdropDirective in your module(s), and add it to the kendo-window(s) which shall/must be a modal.
html
<kendo-window withBackdrop *ngIf="opened">
<!-- window content -->
</kendo-window>
Most helpful comment
Based on the solution of @Raisolution I built a
directivethat automatically adds adiv.k-overlayto the dom when thekendo-windowis rendered.The source can be found here. (Gist)
In case someone finds it useful, feel free to use it.
Usage
Just import the
WindowWithBackdropDirectivein your module(s), and add it to thekendo-window(s) which shall/must be a modal.html <kendo-window withBackdrop *ngIf="opened"> <!-- window content --> </kendo-window>