// Creating a new DynamicLayout DynamicLayout layout = new DynamicLayout(); // Adding a label to the layout layout.Add(new Label() { Text = "Name:" }); // Adding a text box to the layout layout.Add(new TextBox()); // Adding a new row to the layout layout.AddSeparateRow(null, new Label() { Text = "Age:" }, new TextBox());
// Creating a new DynamicLayout DynamicLayout layout = new DynamicLayout(); // Adding a group box to the layout GroupBox groupBox = new GroupBox() { Text = "Personal Information" }; layout.Add(groupBox); // Adding some labels and text boxes to the group box groupBox.Content = new TableLayout( new TableRow( new Label() { Text = "Name:" }, new TextBox() ), new TableRow( new Label() { Text = "Age:" }, new TextBox() ) ); // Adding a new row to the layout layout.AddSeparateRow(null, new Label() { Text = "Phone:" }, new TextBox());In this example, we create a GroupBox and add some labels and text boxes to it using a TableLayout. We then use the AddSeparateRow method to add a new row with a label and a text box for the phone number. Package library: This method belongs to the Eto.Forms library.