public RenameDialog(string fileName) { this.DisplayMode = DialogDisplayMode.Attached; this.Title = "Rename File / Directory"; this.MinimumSize = new Size(320, 10); this.Resizable = true; this.name = Path.GetFileName(fileName); this.path = Path.GetDirectoryName(fileName); var layout = new DynamicLayout { Padding = new Padding(20, 10) }; layout.BeginVertical(Padding.Empty, Size.Empty); layout.BeginHorizontal(); layout.Add(new Label { Text = "File Name" }); layout.Add(FileNameControl(), true); layout.EndHorizontal(); layout.EndVertical(); layout.BeginVertical(Padding.Empty, Size.Empty); layout.BeginHorizontal(); layout.Add(null, true); layout.Add(CancelButton()); layout.Add(OkButton()); layout.EndHorizontal(); layout.EndVertical(); Content = layout; }