In some instances, you might want to keep users from resizing a panel past a certain point. In Panel1, for example, you may have a stack of buttons that you want visible at all times. When confronted with that sort of situation, you can use the SplitterPanel.MinSize property to specify, in pixels, the size of the area that you don't want users to drag past. In this topic, you will learn how to set the SplitterPanel.MinSize property in Design view, in Source view, and in Code.
In Design View
Complete the following steps:
In Source View
To make Panel1 a fixed-size panel, place <Panel1 MinSize="30"></Panel1> between the <cc1:C1Splitter> and </cc1:C1Splitter> tags. Once the SplitterPanel.MinSize property has been set, the markup will resemble the following:
<cc1:C1Splitter ID="C1Splitter6" runat="server" Height="251px" Width="217px" SplitterDistance="50">
<Panel1 MinSize="30">
</Panel1>
</cc1:C1Splitter>
In Code
Complete the following steps:
To write the code in Visual Basic:
Visual Basic |
Copy Code
|
---|---|
Imports C1.Web.Wijmo.Controls.C1Splitter |
To write the code in C#:
C# |
Copy Code
|
---|---|
using C1.Web.Wijmo.Controls.C1Splitter; |
To write the code in Visual Basic:
Visual Basic |
Copy Code
|
---|---|
C1Splitter1.Panel1.MinSize = 30 |
To write the code in C#:
C# |
Copy Code
|
---|---|
C1Splitter1.Panel1.MinSize = 30; |
This Topic Illustrates the Following:
Once you've built the project, drag the splitter bar to the left and observe that it sticks at 30 pixels.