This is a migrated thread and some comments may be shown as answers.

Window resize by special direction

2 Answers 117 Views
Window
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 01 Sep 2015, 08:43 AM

Hi all, 

I am using the Kendo UI Window now, for the resize function, can I just resize the window in a special direction? 

For example, I just want the window can resize east or south so that the window's location not change. 

I find there is a resizingDirection property on the. I try to judge it on the Window's resize event, but it not work.

2 Answers, 1 is accepted

Sort by
0
Accepted
Plamen Lazarov
Telerik team
answered on 03 Sep 2015, 05:14 AM

Hi Nick,

The easiest way to prevent Window resizing from the top or left sides is to hide the corresponding resize handles with CSS. For example: 

<style>
  .k-resize-n, .k-resize-nw, .k-resize-w {
   display: none !important;
  }
</style>

I prepared a simple demo which demonstrates this approach. 

http://dojo.telerik.com/aciPU

Note that the above CSS rule will influence all Window instances. If this is undesired, apply a custom CSS class to the Window wrapper after widget initialization, and add this class to the 3 selectors above.

http://docs.telerik.com/kendo-ui/framework/widgets/wrapper-element

The !important clause is required in order to override display:block styles, which are applied as inline styles to those elements.

Regards,
Plamen Lazarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Nick
Top achievements
Rank 1
answered on 03 Feb 2016, 08:16 AM

Hi Plamen,

Sorry that I not reply your answer these days.

This solution is good for me. Thanks very much!! 

Tags
Window
Asked by
Nick
Top achievements
Rank 1
Answers by
Plamen Lazarov
Telerik team
Nick
Top achievements
Rank 1
Share this question
or