Response Layout

2 posts, 0 answers
  1. Shane
    Shane avatar
    4 posts
    Member since:
    Apr 2019

    Posted 24 Jul 2019 Link to this post

        Is there a way to make the dialog responsive? The api says that it only takes pixels as the height/width, but I do not want to hard code pixels.
  2. Dimiter Topalov
    Dimiter Topalov avatar
    1263 posts

    Posted 25 Jul 2019 Link to this post

    Hello Shane,

    The default behavior of the Dialog component is to resize alongside the viewport when the viewport is becoming smaller. You can also implement some custom logic for setting the Dialog width dynamically based on the viewport size (and during resizing), e.g.:

    The example above demonstrates creating a service that will provide dialog width as a percentage of the available viewport width, so that multiple Dialogs can consume the same calculated value. You can further customize the widths of separate Dialogs (if necessary) by adjusting the value, provided by the service by a custom scaling factor.

    I hope this helps.

    Dimiter Topalov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top