的Winforms手风琴[关闭](winforms accordion [closed])

2019-06-18 14:31发布

任何人都知道C#的WinForms手风琴控制?

preferrably开源或免费。

Answer 1:

下面是一个使用一个基本的例子CheckBox控制与Appearance设置Button的标题。 下载accordion.cs sourceforge上。

演示代码:

    Accordion acc = new Accordion();
    acc.CheckBoxMargin = new Padding(2);
    acc.ContentMargin = new Padding(15, 5, 15, 5);
    acc.ContentPadding = new Padding(1);
    acc.Insets = new Padding(5);
    acc.ControlBackColor = Color.White;
    acc.ContentBackColor = Color.CadetBlue;

    TableLayoutPanel tlp = new TableLayoutPanel { Dock = DockStyle.Fill, Padding = new Padding(5) };
    tlp.TabStop = true;
    tlp.Controls.Add(new Label { Text = "First Name", TextAlign = ContentAlignment.BottomLeft }, 0, 0);
    tlp.Controls.Add(new TextBox(), 1, 0);
    tlp.Controls.Add(new Label { Text = "Last Name", TextAlign = ContentAlignment.BottomLeft }, 0, 1);
    tlp.Controls.Add(new TextBox(), 1, 1);

    acc.Add(tlp,"Contact Info", "Enter the client's information.", 0, true);
    acc.Add(new TextBox { Dock = DockStyle.Fill, Multiline = true, BackColor = Color.White }, "Memo", "Additional Client Info", 1, true, contentBackColor:Color.Transparent);
    acc.Add(new Control(), "Other Info", "Miscellaneous information.");



Answer 2:

XPTaskBar可能会满足您的需求。 我用的是商业(但价格合理的) 氪套房



Answer 3:

Synfusion有GroupBar,它基本上展望像左侧边栏它非常漂亮http://www.syncfusion.com/products/user-interface-edition/windows-forms/tools/features#navigation-package



文章来源: winforms accordion [closed]