For the complete documentation index, see llms.txt. This page is also available as Markdown.

SideButton

A retractable animated button that can be used to expand or collapse other panels.

The side button is a useful control that is also quite common in modern web applications. It adds a small button elastic button to a container. It can be docked to the left or the right and expand in the opposite direction (similar to the GMail options vertical bar).

SideButton Source Code

Code Example

This code snippet creates a SideButton and a Panel. The SideButton is a child of the Panel. The Click Event of the SideButton is attached to and the Collapsed property of the sidebutton is toggled when clicked. Note that this line of code: panel1.Width = collapsed ? 50 : 150; changes the width of the panel based on the collapsed property of the SideButton. See below for what happens when the SideButton is clicked.

How to Use

The SideButton extension can be added to a Wisej.NET project using NuGet Package Manager.

It has a collapsed property that is used in the NavigationBar sample to show/hide a FlexLayoutPanel. This FlexLayout can contain any kind of elements, in this sample it just hosts 2 picture boxes. We also dropped 2 animation extenders on the page so we are able to define sliding effects when the panel is shown/hidden:

Last updated

Was this helpful?