C1Window properties in C1Dialog 2025v2 399

Posted by: enrique.pv-ext on 9 January 2026, 6:05 am EST

    • Post Options:
    • Link

    Posted 9 January 2026, 6:05 am EST

    Hi,

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

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

    Now, this not compiles:

    C1WindowAdd.ShowModalWindowOnLoad = true;
    C1WindowAdd.StartPosition = C1.Web.UI.Controls.C1Window.C1WindowPosition.Page;
    C1WindowAdd.HorizontalAlign = C1.Web.UI.Controls.C1Window.HorizontalPosition.Center;
    C1WindowAdd.VerticalAlign = C1.Web.UI.Controls.C1Window.VerticalPosition.Middle;

    I use

    C1WindowAdd.ShowOnLoad = true;

    Which is the alternative now, for C1Dialog 2025v2 399 for

    StartPosition , HorizontalAlign , VerticalAlign ?

    thanks a lot in advanced, regards

  • Posted 12 January 2026, 9:23 am EST

    Hi,

    Thank you for sharing all the details.

    You can use the Position property of the C1Dialog to replace the StartPosition, HorizontalAlign, and VerticalAlign properties. Please see the documentation below for reference.

    Position Property (C1Dialog)

    Best Regards,

    Kartik

  • Posted 15 January 2026, 7:15 am EST

    	//     Center of the page.
    	C1WindowPosition: Page = 1,
    	//     Middle region
    	VerticalPosition: Middle = 1,
    	//     Center rgion
    	HorizontalPosition: Center = 1,
    
    C1WindowAdd.ShowModalWindowOnLoad = true;
    C1WindowAdd.StartPosition = C1.Web.UI.Controls.C1Window.C1WindowPosition.Page;
    C1WindowAdd.HorizontalAlign = C1.Web.UI.Controls.C1Window.HorizontalPosition.Center;
    C1WindowAdd.VerticalAlign = C1.Web.UI.Controls.C1Window.VerticalPosition.Middle;
    C1WindowAdd.Text = (string)_textsShown[14];

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

    C1WindowAdd.ShowOnLoad = true;
    C1WindowAdd.Title = (string)_textsShown[14];
    // TODO
    // C1WindowAdd.Position = "center";
    // or
    // C1WindowAdd.Position = "[\"center\",\"center\"]"; ?????????????????????
    

    Please, any help ? thx a lot!!

  • Posted 15 January 2026, 9:46 am EST

    Hi,

    Based on your previous code, it appears that C1Window was aligned at the center of the page. To achieve the same behavior with C1Dialog, you can simply set its Position property to center.

    C1Dialog1.Position = "center";

    Best Regards,

    Kartik

  • Posted 25 June 2026, 7:37 am EST

    Great.

    Case 1

    Legacy

    StartPosition="Page" VerticalAlign="Top" HorizontalAlign="Center"

    New:

    Position="center"

    Case 2

    Legacy

    StartPosition="Page" VerticalAlign="Top"  HorizontalAlign="Left"

    New:

    Position="[0,0]"

    Case 3: Middle - Center

    Legacy

    StartPosition="Page"     VerticalAlign="Middle"     HorizontalAlign="Center"

    New:

    Position="?????"

    Reference:

    To specify the dialog position, please refer to Position property.

    Position
    Property (C1Dialog)

    Specifies where the dialog should be displayed. Possible values:

    1. a single string representing position within viewport: ‘center’, ‘left’, ‘right’, ‘top’, ‘bottom’.

    2. a string with array format containing an x,y coordinate pair in pixel offset from left, top corner of viewport (e.g. “[350,100]”)

    3. a string with array format containing x,y position string values (e.g. “[‘right’,‘top’]” for top right corner).

    Position=“[120,280]”
    is correct.

    Position="center"
    is correct.

    Please friends, any suggestions for Case 3 ?

    thanks, regards,

  • Posted 26 June 2026, 2:28 am EST

    Hello Enrique,

    You can follow third point for all use cases: “a string with array format containing x,y position string values (e.g. “[‘right’,‘top’]” for top right corner).”

    For your case 3, the correct option setting will be the following:

    $("#<%=C1Dialog1.ClientID%>").c1dialog('option', 'position', ['center', 'middle']);

    For implementation, please refer to the attached sample: C1Dialog_Sample.zip

    Regards,

    Uttkarsh.

  • Posted 26 June 2026, 7:43 am EST

    is the same ?

    Markup

    Position="['center', 'middle']"

    Javascript

    $("#<%=C1Dialog1.ClientID%>").c1dialog('option', 'position', ['center', 'middle'])
  • Posted 29 June 2026, 3:19 am EST

    Hello Enrique,

    Yes, you can. However, make sure that there is no space in the string setting “Position” property. The following is the correct way to set Position:

    Position="['center','middle']"

    Regards,

    Uttkarsh.

  • Posted 30 June 2026, 9:25 am EST

    Great!, grateful a lot, friends!

    Which is alternative with C1Dialog for legacy code using StartPosition=“Manual”

    <cc2:C1Window ID="PlaceWindow" 
                runat="server" 
                StartPosition="Manual"
                UseEmbeddedVisualStyles="False"  VisualStyle="Vista"  VisualStylePath="~/VisualStyles" 
                Height="194px"
                AllowResize="false" 
                Width="219px"> 

    any suggestions ?

    thanks ?

  • Posted 1 July 2026, 4:16 am EST

    Hello Enrique,

    It seems setting C1Window’s StartPosition to “Manual” just disables automatic centering or default positioning, which works out-of-the-box when you set Position property in C1Dialog. So, you can simply drop using this property and remove it from the code.

    If this property has a different use-case at your end, please share details with us. We’ll try look for a workaround that suites your requirements.

    Regards,

    Uttkarsh.

Need extra support?

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

Learn More

Forum Channels