XSalSeparator
Namespace: PPJ.Runtime.XSal
Assembly: PPJ.Runtime.XSal.50 (5.0.0.0)
Displays a nonselectable horizontal or vertical divider in an XSal toolbar or container.
- C#
- VB.NET
public class XSalSeparator : SalUserControl
Public Class XSalSeparator
Inherits SalUserControl
The default divider is vertical and invisible. Changing orientation can exchange its width and height, change its anchor, and center it within its parent. Add the control to a parent before changing orientation.
Example:
void AddDivider(System.Windows.Forms.Control parent)
{
var divider = new PPJ.Runtime.XSal.XSalSeparator();
parent.Controls.Add(divider);
divider.Style = PPJ.Runtime.XSal.XSalSeparator.SeparatorStyle.Etched;
divider.Horizontal = true;
}
Constructors
XSalSeparator()
Initializes a transparent, nonselectable divider with a default size of 10 by 20 pixels.
Properties
Horizontal
Boolean: Gets or sets whether the divider runs horizontally.
Changing this value adjusts the orientation, anchor, and position relative to the parent. A parent must be assigned before changing the value.
Style
SeparatorStyle: Gets or sets the drawing style and invalidates the control when the style changes.
Vertical
Boolean: Gets or sets whether the divider runs vertically; this is the inverse of Horizontal.
Methods
FromHandle(handle)
Gets the managed XSal divider associated with a native window handle.
| Parameter | Type | Description |
|---|---|---|
| handle | SalWindowHandle | The handle to look up. |
Returns: XSalSeparator. The associated divider, or null when no managed control is associated with the handle.
Throws:
- InvalidCastException The handle belongs to a managed control of a different type.
OnPaint(e)
Paints the selected divider style before raising the base paint event.
| Parameter | Type | Description |
|---|---|---|
| e | PaintEventArgs | The graphics surface and clipping region for painting. |
Inherited By
| Name | Description |
|---|---|
| XSalSeparatorDoubleRaised | Provides an XSal divider initialized as two raised lines. |
| XSalSeparatorEtched | Provides an XSal divider initialized as an etched line. |
| XSalSeparatorInvisible | Provides an XSal divider initialized as an unpainted spacer. |
| XSalSeparatorSingleRaised | Provides an XSal divider initialized as one raised line. |
Implements
| Name | Description |
|---|---|
| ISalWindow |