Open in new window

Social Icons

Sunday, November 13, 2011

DevExpress ASPxPopupControl - Dynamically Resizing the ASPxPopupControl

I created a page on my website eagleware.net that contains examples on how to dynamically resize an ASPxPopupControl.

This samples area deals with the peculiarities of resizing the ASPxPopupControl; in particular:

  • The ASPxPopupControl Width & Height properties do not have any affect on HTML or CSS content placed within the ASPxPopupControl ContentCollection. The controls width & height properties do work when you use the ContentUrl property to load the ASPxPopupControl with content or use an Iframe in the ASPxPopupControl ContentCollection, both of which will allow you to resize the ASPxPopupControl and its content if the AllowResize="true" is specified.
  • If however you place content directly into the ASPxPopupControl you are not so lucky. In this situation the controls Width & Height are in effect ignored by the ASPxPopupControl and it uses whatever CSS formatting is specified for the content to determine the ASPxPopupControl's size. Two exceptions to this (that I know of) are: if your content is wrapped in a div element set with a style width: 100% then the ASPxPopupControl Width property will work allowing the popup to be resized horizontally but leaving white space at the bottom depending on content and size of the popup; if the ASPxPopupControl Height is set higher than your div's content then the ASPxPopupControl uses it's Height property resulting in dead space below your content.

The code to dynamically resize the ASPxPopupControl can be downloaded from my website and here is a short video briefly explaining how the code works:

 

Dynamically Resizing the ASPxPopupControl

0 comments:

Post a Comment