[]
Gets or sets the layout of InnerPanel after enlarge form.
public InnerPanelLayoutMode InnerPanelLayoutMode { get; set; }
Type | Description |
---|---|
InnerPanelLayoutMode | One of InnerPanelLayoutMode values. The default is None. |
The following code example shows how to use this property.
This code example is part of a larger example provided for the Controls property.
public class GcZoomControlsDemo : Form
{
private GcZoom _gcZoom1 = new GcZoom();
private ComboBox _innerPanelLayoutModeComboBox;
public GcZoomControlsDemo()
{
InitializeComponent();
_gcZoom1.Target = this;
_innerPanelLayoutModeComboBox.TextChanged += _innerPanelLayoutModeComboBox_TextChanged;
}
void _innerPanelLayoutModeComboBox_TextChanged(object sender, EventArgs e)
{
if (_innerPanelLayoutModeComboBox.Text == "None")
{
_gcZoom1.InnerPanelLayoutMode = InnerPanelLayoutMode.None;
}
else if (_innerPanelLayoutModeComboBox.Text == "MiddleCenter")
{
_gcZoom1.InnerPanelLayoutMode = InnerPanelLayoutMode.MiddleCenter;
}
}
private void InitializeComponent()
{
_innerPanelLayoutModeComboBox = new System.Windows.Forms.ComboBox();
_innerPanelLayoutModeComboBox.Items.AddRange(new object[] { "None", "MiddleCenter"});
_innerPanelLayoutModeComboBox.Location = new Point(120, 20);
this.Controls.Add(_innerPanelLayoutModeComboBox);
}
}
Public Class GcZoomControlsDemo
Inherits Form
Private _gcZoom1 As New GcZoom()
Private _innerPanelLayoutModeComboBox As ComboBox
Public Sub New()
InitializeComponent()
_gcZoom1.Target = Me
AddHandler _innerPanelLayoutModeComboBox.TextChanged, AddressOf _innerPanelLayoutModeComboBox_TextChanged
End Sub
Private Sub _innerPanelLayoutModeComboBox_TextChanged(sender As Object, e As EventArgs)
If _innerPanelLayoutModeComboBox.Text = "None" Then
_gcZoom1.InnerPanelLayoutMode = InnerPanelLayoutMode.None
ElseIf _innerPanelLayoutModeComboBox.Text = "MiddleCenter" Then
_gcZoom1.InnerPanelLayoutMode = InnerPanelLayoutMode.MiddleCenter
End If
End Sub
Private Sub InitializeComponent()
_innerPanelLayoutModeComboBox = New System.Windows.Forms.ComboBox()
_innerPanelLayoutModeComboBox.Items.AddRange(New Object() {"None", "MiddleCenter"})
_innerPanelLayoutModeComboBox.Location = New Point(120, 20)
Me.Controls.Add(_innerPanelLayoutModeComboBox)
End Sub
End Class