Export (0) Print
Expand All

SplitContainer.FixedPanel Property

Gets or sets which SplitContainer panel remains the same size when the container is resized.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public FixedPanel FixedPanel { get; set; }

Property Value

Type: System.Windows.Forms.FixedPanel
One of the values of FixedPanel. The default value is None.

ExceptionCondition
InvalidEnumArgumentException

The assigned value is not one of the FixedPanel values.

Use this property to specify which SplitContainer panel stays the same size when a user resizes the container.

The following code example shows a horizontal splitter whose top panel is defined as a FixedPanel so that it does not resize along with the container. Other basic properties of a horizontal splitter are also shown. This example is part of a larger example provided for the SplitContainer class.

// Basic SplitContainer properties. 
// This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.
splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
// The top panel remains the same size when the form is resized.
splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
splitContainer2.Location = new System.Drawing.Point(0, 0);
splitContainer2.Name = "splitContainer2";
// Create the horizontal splitter.
splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
splitContainer2.Size = new System.Drawing.Size(207, 273);
splitContainer2.SplitterDistance = 125;
splitContainer2.SplitterWidth = 6;
// splitContainer2 is the third control in the tab order.
splitContainer2.TabIndex = 2;
splitContainer2.Text = "splitContainer2";

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft