Gaia Ajax: AspectModal

Aspect for making Widgets Modal by obscuring the entire surface on the screen. If you attach this to a widget and you make the widget visible during a callback then only that widget (and widgets with higher z-index) will be "accessible" to be clicked by the end user since all other widgets will be "obscured" by a DIV which will fill up the entire viewport of the browser. Modality is something that previously only was available when developing Windows Forms applications, but now with Gaia Ajax it's made available as an Aspect which you can attach to almost all Gaia Controls via the Aspects collection It can be customized with a Color and Opacity by using an overloaded ctor The Window has the Modal property which is automatically adding the Aspect for you if set to true.


   1:   
   2:   
   3:  <gaia:LinkButton 
   4:      ID="zOpenWindow1" 
   5:      runat="server" 
   6:      Text="Click here to open the Window with Modal property set to true"
   7:      OnClick="zOpenWindow1_Click">
   8:      </gaia:LinkButton>
   9:      
  10:  <br />
  11:   
  12:  <gaia:LinkButton 
  13:      ID="zOpenWindow2" 
  14:      runat="server" 
  15:      Text="Click here to open the Window with AspectModal added programmatically"
  16:      OnClick="zOpenWindow2_Click">
  17:      </gaia:LinkButton>
  18:   
  19:  <gaia:Window 
  20:      ID="zWindow1" 
  21:      Visible="false"
  22:      runat="server" 
  23:      Caption="Modal Window"
  24:      Width="480"
  25:      Height="200"
  26:      Draggable="false"
  27:      Resizable="false"
  28:      Minimizable="false"
  29:      Maximizable="false"
  30:      Modal="true">
  31:          This Window is Modal when visible. Just set the Modal property to True on the Window
  32:          to make it so. For all other Gaia Controls you can make them modal by adding AspectModal()
  33:          directly yourself.
  34:      </gaia:Window>
  35:      
  36:  <gaia:Window 
  37:      ID="zWindow2" 
  38:      Visible="false"
  39:      runat="server" 
  40:      Caption="Modal Window with AspectModal added"
  41:      Width="480"
  42:      Height="200"
  43:      Draggable="false"
  44:      Resizable="false"
  45:      Minimizable="false"
  46:      Maximizable="false">
  47:          This Window is Modal when visible. This Window was made Modal by adding AspectModal
  48:          to the Aspects collection of the Gaia Control. Most Gaia Controls have this Aspects collection
  49:          and thus can be made Modal.
  50:          <br />
  51:          Notice that when you add AspectModal yourself you can customize the Color and
  52:          Opacity of the Modality. 
  53:      </gaia:Window>
  54:   
  55:   
4.0.224.1