Vertical - horizontal align javascript methods C1Window to C1Dialog 2025v2 399

Posted by: enrique.pv-ext on 14 January 2026, 11:20 am EST

    • Post Options:
    • Link

    Posted 14 January 2026, 11:20 am EST

    Hi,

    Migrate from 2010v1 to 2025v2 399 in ASP.NET WebForms NET Framework 4.8.1.

    Migrating C1Window to C1Dialog 2025v2 399.

    Using C1Dialog from C1.Web.Wijmo.Controls.48.dll

    I have the older code javasciprt:

    var dialog = $find(C1WindowClientID);
    
    dialog.set_verticalAlign(1);
    dialog.set_horizontalAlign(1);

    I have now the code javasciprt:

    	var dialog = $("#" + C1WindowClientID);
    	dialog.c1dialog({
    		title: TitleText,
    		modal: true
    	});
    	dialog.c1dialog("open");

    Which is the alternative now, for C1Dialog 2025v2 399

    how-to use c1dialog for set vertical align ?

    how-to use c1dialog for set horizontalAlign?

    		dialog.set_verticalAlign(1);
    		dialog.set_horizontalAlign(1);

    Thanks a lot

  • Posted 15 January 2026, 4:38 am EST

    Hi Kiquenet,

    To set the horizontal and vertical alignment of the modal you may simply use the position property as position property accepts a string with array format containing x,y position string values (e.g. “[‘right’,‘top’]” for top right corner).

    Please refer to the following pages of our documentation for more details on the position property:

    https://developer.mescius.com/componentone/docs/webforms/online-carousel/C1.Web.Wijmo.Controls.45~C1.Web.Wijmo.Controls.C1Dialog.C1Dialog~Position.html

    Sample Code:

    dialog.c1dialog({position:"['right','top']"});
    

    I hope this helps!

    Regards,

    Akshay

  • Posted 15 January 2026, 6:03 am EST

    I was using older version in my code (javascript and C#): VerticalPosition and HorizontalPosition

    	public enum VerticalPosition
    	{
    		//     Top region
    		Top = 0,
    		//     Middle region
    		Middle = 1,
    		//     Bottom region
    		Bottom = 2
    	}
    	public enum HorizontalPosition
    	{
    		//     Left region
    		Left = 0,
    		//     Center rgion
    		Center = 1,
    		//     Right region
    		Right = 2
    	}

    I try change code from older C1Windows to new C1Dialog:

    	//     Center of the page.
    	C1WindowPosition: Page = 1,
    	//     Middle region
    	VerticalPosition: Middle = 1,
    	//     Center rgion
    	HorizontalPosition: Center = 1,
    
    	dialog.set_startPosition(C1.Web.UI.Controls.C1Window.C1WindowPosition.page);
    	dialog.set_verticalAlign(C1.Web.UI.Controls.C1Window.VerticalPosition.middle);
    	dialog.set_horizontalAlign(C1.Web.UI.Controls.C1Window.HorizontalPosition.center);

    I dont know if this will be the new code??

    VerticalPosition.middle = center ?

    HorizontalPosition.center = center ?

         dialog.c1dialog({position:'center'}); ??
        // or
    	dialog.c1dialog({position:'["center","center"]'}); ??

    Please, any help ? thx a lot!!

  • Posted 16 January 2026, 1:02 am EST

    Hi,

    It seems this query has already been discussed in another thread: https://developer.mescius.com/forums/webforms-edition/startposition-and-x-and-y-methods-c1window-to-c1dialog-2025v2-399

    To avoid any confusion, I would suggest that if you are facing any issues, then please continue over the above thread.

    Regards,

    Akshay

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels