Intersoft Support Center

Load Layout programmatically in Server-side

You can load WebPaneManager dynamically from runtime.

This topic will show you how to load layout programmatically in Server-Side.

To load layout programmatically in Server-Side

  1. Drag WebPaneManager control to the WebForm.
  2. Create xml file that contains layout structure of the panes.
    <WebGroupPane GroupType="VerticalTile" Name="RootGroup">
      <Panes>
        <WebPane WidthValue="30%" ContentScrollable="False" Text="Mail" Width="Custom" AllowCollapse="Yes" Name="paneMail">
          <ContentPadding />
        </WebPane>
        <WebGroupPane Text="GroupPane 0" Name="GroupPane0">
          <Panes>
            <WebPane Visible="False" HeaderVisible="No" HeightValue="30px" AllowResize="No" Height="Custom" AllowCollapse="No" Name="paneFind">
              <ContentPadding Top="0px" Left="0px" Bottom="0px" Right="0px" />
            </WebPane>
            <WebPane CaptionDisplayMode="TextAndImage" ContentMode="UseIFrame" Text="Messages" AllowCollapse="Yes" Image="../Images/Inbox.gif" Name="paneMessages" HeaderAppearance="UseMainStyle" ContentURL="../Empty.aspx">
              <ContentPadding />
            </WebPane>
            <WebPane ContentMode="UseIFrame" Text="Message Details" Name="paneMessageDetail" HeaderAppearance="UseSubStyle">
              <ContentPadding />
            </WebPane>
          </Panes>
        </WebGroupPane>
      </Panes>
    </WebGroupPane>
  3. Place the following code in Page_Load event to load the layout structure from xml file.
    C# Copy Code
    protected void Page_Load(object sender, EventArgs e)
    {
       WebPaneManager1.LoadPanesStructureFromXml(Server.MapPath("../Structures/SampleWebPaneManager.xml"));
    }
    

  4. Run the project and WebPaneManager will load the layout programmatically using the xml file.

Designing Layout with WebPaneManager

Theming UI with WebStyleManager

Previous Next