You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a form, by default, it's sized based on the contents. This is great. But is there a way to have the form resize when the content size changes? It doesn't seem to do that by default.
Code that Demonstrates the Problem
class MyForm : Form
{
public MyForm()
{
var layout = new DynamicLayout();
layout.BeginVertical();
layout.AddRow(new Label { Text = "hello" });
var panel = new Panel();
layout.AddRow(panel);
var button = new Button { Text = "Click me" };
button.Click += (sender, args) => panel.Content = new Label { Text = "world" };
layout.AddRow(button);
layout.EndVertical();
Content = layout;
}
}
Specifications
Version: 2.5.0
Platform(s): WPF + WinForms
Operating System(s): Windows 10
The text was updated successfully, but these errors were encountered:
When creating a form, by default, it's sized based on the contents. This is great. But is there a way to have the form resize when the content size changes? It doesn't seem to do that by default.
Code that Demonstrates the Problem
Specifications
The text was updated successfully, but these errors were encountered: