Skip to content

Infragistics Community Forum / Web / Ultimate UI for ASP.NET Web Forms / How to set a gray-ish background with modal dialog?

How to set a gray-ish background with modal dialog?

New Discussion
Michael Yarbrough
Michael Yarbrough asked on Apr 6, 2009 11:06 AM

I see on some of the Infragistics examples that you are setting the background to a gray-ed out look while making a modal window pop-up. How is that done?

Thanks.

Sign In to post a reply

Replies

  • 0
    Christopher Bishop
    Christopher Bishop answered on Mar 31, 2009 11:42 PM

    Not sure how it is done with the webdialog but to achive the same thing It is a div set to absolute position, 100%width 100%height z-index:100000 (you get the idea) using a semi-transparent png (plus for IE->dx transforms) it is pretty simple, just a css show hide deal.

    • 0
      Michael Yarbrough
      Michael Yarbrough answered on Apr 1, 2009 2:38 PM

      Thanks. I tried using the ModalBackgroundCSSClass property to no avail but then used your idea instead. Here is my code to make it work along with the little Png I made for it.:

       

          <style type="text/css">

                         .ModalBackdrop {

                                   width: 100%;

                                   height: 100%;

                                   z-index: 100000;

                                   position: absolute;

                                   background-image: url(ModalBG.png);

                                   background-repeat: repeat;

                                   margin-top: 0px;

                                   margin-left: 0px;

                         }

       

              body

              {

                        margin: 0 0 0 0;

              }

             

          </style> 

         

          <script type="text/javascript">

              function SetModal() {

                 document.getElementById("ModalBackdrop").className = "ModalBackdrop";

       

              }

             

              function RestoreNonModal() {

              var dialog=$find('WebDialogWindow1');

             

                if(dialog.get_WindowState == "undefined"); {

                  //it's hidden

                  document.getElementById("ModalBackdrop").className = "";

                }

                 

              }

         

          </script> 

       

      And this div in my form area.

      <div id="ModalBackdrop" class=""></div>

      Here is the 16×16 png –> 

      • 0
        Arun
        Arun answered on Apr 6, 2009 11:06 AM

        Hi

        I have a question did you do this by setting the modal property to 'true' because i am trying to achieve something similar to this but with modla property being 'false'   can you help me on this

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Michael Yarbrough
Favorites
0
Replies
3
Created On
Apr 06, 2009
Last Post
17 years, 5 months ago

Suggested Discussions

Created by

Created on

Apr 6, 2009 11:06 AM

Last activity on

Feb 12, 2026 8:55 AM