winforms accordion [closed]

穿精又带淫゛_ 提交于 2019-11-26 11:18:05

问题


anyone know a c# winforms accordion control?

preferrably open source or free.


回答1:


Here is a basic example that uses CheckBox controls with Appearance set to Button for the headers. Download accordion.cs on sourceforge.

Demo code:

    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.");




回答2:


XPTaskBar might meet your needs. I use the commercial (but reasonably-priced) Krypton Suite




回答3:


Synfusion has GroupBar , its basically Outlook like Left Side Bar Its pretty slick http://www.syncfusion.com/products/user-interface-edition/windows-forms/tools/features#navigation-package



来源:https://stackoverflow.com/questions/1303195/winforms-accordion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!