Open window bottom-right?

4 posts, 0 answers
  1. Bob
    Bob avatar
    123 posts
    Member since:
    Sep 2012

    Posted 20 Aug 2014 Link to this post

    Is there a way to open window bottom-right like the notification control?
  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 21 Aug 2014 Link to this post

    Hello Bob,

    The desired behavior is possible to achieve, but not automatically. You need to do the following:

    - measure the browser viewport size
    - use explicit Window width and height
    - calculate and set an appropriate Window position, based on the above

    http://docs.telerik.com/kendo-ui/api/web/window#configuration-position

    The above can also be done after Window initialization. In this case you have the freedom to not set explicit Window dimensions, but measure them.

    http://docs.telerik.com/kendo-ui/api/web/window#methods-setOptions

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Bob
    Bob avatar
    123 posts
    Member since:
    Sep 2012

    Posted 21 Aug 2014 in reply to Dimo Link to this post

    Do you know of a pure CSS way to do this?  I played around with position fixed and absolute for a few minutes but it didn't work out so well.
  5. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 22 Aug 2014 Link to this post

    Hello Bob,

    A "relatively" pure CSS way would be to override the standard Window behavior:

    1) reset the top and left styles of the widget wrapper element (div.k-window) to "auto"
    2) apply bottom and right stylesto the same element

    However, this will cause unexpected side effects related to resizing and dragging and you have to be prepared for limitations of this appoach.

    http://dojo.telerik.com/EloM

    A variation of the above technique is to use external styles with !important, instead of inline styles. This will require you to apply a custom class to the Window wrapper element, otherwise the custom styles will target all Window instances on the page (or in the application). Since the custom CSS class will be applied with Javascript, a 100% pure CSS solution (in case you are after it) does not exist.

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready