SplitterControlExtensions
Wisej.Web.Markup.SplitterControlExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the SplitContainer class.
public class SplitterControlExtensions
Methods
BorderStyle<TSplitContainer>(splitContainer, borderStyle)

Sets the BorderStyle property of the specified SplitContainer.
Returns: TSplitContainer. The modified split container with the updated BorderStyle property.
This method allows you to set the border style for the split container.
mySplitContainer.BorderStyle(BorderStyle.Fixed3D);
FixedPanel<TSplitContainer>(splitContainer, fixedPanel)

Sets the FixedPanel property of the specified SplitContainer.
Returns: TSplitContainer. The modified split container with the updated FixedPanel property.
This method allows you to specify which panel remains the same size when the split container is resized.
mySplitContainer.FixedPanel(FixedPanel.Panel1);
IsSplitterFixed<TSplitContainer>(splitContainer, value)

Sets the IsSplitterFixed property of the specified SplitContainer.
Returns: TSplitContainer. The modified split container with the updated IsSplitterFixed property.
This method allows you to specify whether the splitter can be moved by the user.
mySplitContainer.IsSplitterFixed(true);
OnOrientationChanged<TSplitContainer>(splitContainer, action)

Attaches an event handler for the OrientationChanged event of the specified SplitContainer.
TSplitContainer
The type of the split container, must inherit from SplitContainer and support the OrientationChanged event.
action
An action to execute when the orientation of the split container changes.
Returns: TSplitContainer. The modified split container with the attached OrientationChanged event handler.
This method allows you to execute a custom action whenever the orientation of the split container changes.
mySplitContainer.OnOrientationChanged(sc =>
{
AlertBox.Show("Orientation changed!");
});
OnSplitterMoved<TSplitContainer>(splitContainer, action)

Attaches an action to be executed when the splitter has been moved.
action
The action to execute when the splitter is moved. It receives the split container and the event arguments as parameters.
Returns: TSplitContainer. The original split container instance with the event handler attached.
This method allows you to easily attach a custom action to the SplitterMoved event.
var mySplitContainer = new SplitContainer();
mySplitContainer.OnSplitterMoved((container, args) =>
{
// Custom logic when the splitter is moved
});
OnSplitterMoving<TSplitContainer>(splitContainer, action)

Attaches an action to be executed when the splitter is being moved.
action
The action to execute when the splitter is moving. It receives the split container and the event arguments as parameters.
Returns: TSplitContainer. The original split container instance with the event handler attached.
This method allows you to easily attach a custom action to the SplitterMoving event.
var mySplitContainer = new SplitContainer();
mySplitContainer.OnSplitterMoving((container, args) =>
{
// Custom logic when the splitter is moving
});
Orientation<TSplitContainer>(splitContainer, orientation)

Sets the Orientation property of the specified SplitContainer.
Returns: TSplitContainer. The modified split container with the updated Orientation property.
This method allows you to set the orientation (horizontal or vertical) of the split container.
mySplitContainer.Orientation(Orientation.Vertical);
Panel1<TSplitContainer>(splitContainer, controls)

Adds an array of controls to Panel1 of the specified SplitContainer.
Returns: TSplitContainer. The split container with the updated Panel1 controls.
This method allows you to add multiple controls to the first panel of a split container.
mySplitContainer.Panel1(new Button(), new TextBox());
Panel1Collapsed<TSplitContainer>(splitContainer, value)

Sets the Panel1Collapsed property of the specified SplitContainer.
Returns: TSplitContainer. The modified split container with the updated Panel1Collapsed property.
This method allows you to collapse or expand Panel1 of the split container.
mySplitContainer.Panel1Collapsed(true);
Panel1MinSize<TSplitContainer>(splitContainer, size)

Sets the Panel1MinSize property of the specified SplitContainer.
Returns: TSplitContainer. The modified split container with the updated Panel1MinSize property.
This method allows you to specify the minimum size of Panel1 in the split container.
mySplitContainer.Panel1MinSize(100);
Panel2<TSplitContainer>(splitContainer, controls)

Adds an array of controls to Panel2 of the specified SplitContainer.
Returns: TSplitContainer. The split container with the updated Panel2 controls.
This method allows you to add multiple controls to the second panel of a split container.
mySplitContainer.Panel2(new Label(), new ListBox());
Panel2Collapsed<TSplitContainer>(splitContainer, value)

Sets the Panel2Collapsed property of the specified SplitContainer.
Returns: TSplitContainer. The modified split container with the updated Panel2Collapsed property.
This method allows you to collapse or expand Panel2 of the split container.
mySplitContainer.Panel2Collapsed(true);
Panel2MinSize<TSplitContainer>(splitContainer, size)

Sets the Panel2MinSize property of the specified SplitContainer.
Returns: TSplitContainer. The modified split container with the updated Panel2MinSize property.
This method allows you to specify the minimum size of Panel2 in the split container.
mySplitContainer.Panel2MinSize(100);
SplitterDistance<TSplitContainer>(splitContainer, distance)

Sets the splitter distance for the specified SplitContainer, determining the size of Panel1.
distance
The distance, in pixels, from the left or top edge of the split container to the splitter.
Returns: TSplitContainer. The split container with the updated splitter distance.
This method allows you to specify the size of the first panel in a split container by setting the distance of the splitter.
mySplitContainer.SplitterDistance(150);
SplitterWidth<TSplitContainer>(splitContainer, width)

Sets the SplitterWidth property of the specified SplitContainer.
Returns: TSplitContainer. The modified split container with the updated SplitterWidth property.
This method allows you to specify the width of the splitter in the split container.
mySplitContainer.SplitterWidth(10);
Last updated
Was this helpful?