Excelente lógica, corta y sencilla. Para menús que no sean laterales se puede usar false o true en vez del tamaño de altura para los submenús. Gracias por compartir.
This is my Solution : I created the method "TogglePanel" that would take the panel related to the clicked button as a paramter and perform a simple logic : 1- change the panel state 2- flowLayoutPanel1.Controls.OfType().ToList() : This line of code is going to select all sub-panels within the main panel. 3- The "foreach" method then will loop through these sub-panels and set their visibility to false except the one that we'll display. #NOTE : do not forget to call the method "TogglePanel" inside the event handler of the button in question and pass the appropriate panel to it. private void TogglePanel(Panel currentPanel) { currentPanel.Visible = !currentPanel.Visible; flowLayoutPanel1.Controls.OfType().ToList().ForEach(panel => { if (currentPanel.Name != panel.Name) panel.Visible = false; }); }
Excelente lógica, corta y sencilla. Para menús que no sean laterales se puede usar false o true en vez del tamaño de altura para los submenús. Gracias por compartir.
Worked like a charm ! Thank you very much
How did you get the down arrows on the buttons to appear? Is it in the image file?
podrias poner un link para poder descargar los iconos?gracias
where you download the icon?
Oi você vende o projeto ?
songs??
nice nice
where you download the link
PЯӨMӨƧM 👌
This is my Solution :
I created the method "TogglePanel" that would take the panel related to the clicked button as a paramter and perform a simple logic :
1- change the panel state
2- flowLayoutPanel1.Controls.OfType().ToList() : This line of code is going to select all sub-panels within the main panel.
3- The "foreach" method then will loop through these sub-panels and set their visibility to false except the one that we'll display.
#NOTE : do not forget to call the method "TogglePanel" inside the event handler of the button in question and pass the
appropriate panel to it.
private void TogglePanel(Panel currentPanel)
{
currentPanel.Visible = !currentPanel.Visible;
flowLayoutPanel1.Controls.OfType().ToList().ForEach(panel =>
{
if (currentPanel.Name != panel.Name)
panel.Visible = false;
});
}