Version

Center the Dialog Window

When you first place WebDialogWindow™ on your page, WebDialogWindow will use that location as the default position of the dialog window. If the location where you placed WebDialogWindow is not appropriate for your web page’s needs, you can always change the dialog window’s initial location by setting the InitialLocation property to Centered; this will display the dialog window in the center of the page rather than the location you placed it at design time. If you want to change the location, you’ll need to set the InitialLocation property to Manual and set the Top and Left properties.

The following code demonstrates how to display the dialog window in the center of the web page.

In Visual Basic:

' Center the Dialog Window.
Me.WebDialogWindow1.InitialLocation = _
	Infragistics.Web.UI.LayoutControls.DialogWindowPosition.Centered

In C#:

 // Center the Dialog Window.
this.WebDialogWindow1.InitialLocation =
	Infragistics.Web.UI.LayoutControls.DialogWindowPosition.Centered;