2009-08-19 9 views
11

quelqu'un sait un C# winforms accordéon contrôle?winforms accordéon

préférablement open source ou libre.

+0

Check this out. Il est génial http://www.codeproject.com/Articles/416521/Easy-WinForms-Accordion-Control Ceci est une réponse tardive, mais il est utile à quelqu'un d'autre – Moons

Répondre

0

XPTaskBar pourrait répondre à vos besoins. J'utiliser la publicité (mais à un prix raisonnable) Krypton Suite

9

Voici un exemple de base qui utilise CheckBox contrôles avec Appearance ensemble à Button pour les en-têtes. Download accordion.cs on sourceforge.

Code de démonstration:

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

enter image description here

Questions connexes