Open Kendo Window maximized programmatically

1 Answer 76 Views
Window
Mike
Top achievements
Rank 1
Mike asked on 08 Feb 2022, 04:44 PM

Hi,

I am trying to open a KendoUI WIndow in the maximized state, or to set the state on the window programmatically, but nothing worked - the state on the Kendo window object is still "default".

Here is that I have tried until now:

window.state = "maximized";
window.stateChange.next("maximized");
window.titleBarView.service.maximizeAction();
import { WindowService } from '@progress/kendo-angular-dialog';

export class MyWindowComponent {
   constructor(private windowService: WindowService){}

   public openWindow() {
      this.windowService.open({
         content: MyModalComponent,
	 title: 'Modal Form View',
	 resizable: true,
	 height: 500,
	 width: 600,
	 top: 100,
	 left: 200,
	 state: 'maximized'
      });
   }
}

Am I setting the state the correct way?

Or is there any other way I could achieve this?

 

Best regards,

Mike Fechner

1 Answer, 1 is accepted

Sort by
0
Accepted
Valentin
Telerik team
answered on 10 Feb 2022, 02:18 PM

Hi Mike,

Thank you for the provided details.

Indeed, the last approach of setting the state is correct. I tried the same markup and created the following StackBlitz example. The window seems to me maximized once it is opened:

https://stackblitz.com/edit/angular-mbrlku-3k69jr

Could you please check the demo and try to reproduce the unwanted behavior. Feel free to use the example above as a base. Then please share the updated StackBlitz or archive a local project. This will allow us to inspect the exact implementation and I will be able to provide further feedback on this case. Thanks in advance.

Looking forward to your reply.

Regards,
Valentin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Window
Asked by
Mike
Top achievements
Rank 1
Answers by
Valentin
Telerik team
Share this question
or