SideButton
Namespace: Wisej.Web.Ext.SideButton
Assembly: Wisej.Web.Ext.SideButton (4.1.0.0)
Represents a retractable animated button that can be used to expand or collapse other panels.
- C#
- VB.NET
public class SideButton : Button
Public Class SideButton
Inherits Button
When Collapsed is true the button shrinks to the collapsed width defined by the theme (appearance "side-button") and slides back out to its full Width when the pointer hovers over it. The height of the button is always taken from the theme.
Constructors
SideButton()
Initializes a new instance of the SideButton class.
Properties
Alignment
LeftRightAlignment: Returns or sets the alignment and direction of the SideButton. (Default: Left)
Indicates the side the button retracts to when Collapsed is true: Left retracts toward the left edge and Right keeps the button anchored to its right end and retracts toward the right. The value is also applied as a "left" or "right" state that the theme can style.
Example:
Placing a side button on the right edge of a form that retracts to the right:
this.sideButton1.Alignment = LeftRightAlignment.Right;
this.sideButton1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
this.sideButton1.Collapsed = true;
Collapsed
Boolean: Returns or sets the collapsed state of the SideButton. (Default: False)
When collapsed, the button is reduced to the collapsed width defined by the theme and expands temporarily to its full Width while the pointer is over it. Changing this property also changes the height of the button to the theme height of the "collapsed" or "default" state.
Example:
Toggling a side panel and the collapsed state of the button when it is clicked:
private void sideButton1_Click(object sender, EventArgs e)
{
this.panelNavigation.Visible = !this.panelNavigation.Visible;
this.sideButton1.Collapsed = !this.panelNavigation.Visible;
}
Methods
OnWebRender(config)
| Parameter | Type | Description |
|---|---|---|
| config | Object |
SetBoundsCore(x, y, width, height, specified)
| Parameter | Type | Description |
|---|---|---|
| x | Int32 | |
| y | Int32 | |
| width | Int32 | |
| height | Int32 | |
| specified | BoundsSpecified |